Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
int gripper=700;char cByte;TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) { if (getError()!=0) { rprintf("ERROR!\n"); } else { cByte=uart2GetByte(); if (cByte=='x') gripper=gripper+10; if (cByte=='y') gripper=gripper-10; servo(PORTL,2,gripper); rprintf("cByteValue: %d GripValue: %d\n", cByte, gripper); } return 20000; }
../fergybot.c:101: warning: implicit declaration of function 'servo'../fergybot.c:101: error: 'PORTL' undeclared (first use in this function)../fergybot.c:101: error: (Each undeclared identifier is reported only once../fergybot.c:101: error: for each function it appears in.)
SERVO svoTurret = MAKE_SERVO(TRUE, E5, 1500, 875);
SERVO_LIST servos_PWM[] = {&svoRAnkle, &svoRKnee, &svoRHip, &svoLAnkle, &svoLKnee, &svoLHip, &svoTurret};SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos_PWM);
servosConnect(&bank1);
In my Brat program I used a bunch of lines that looked like:Code: [Select]SERVO svoTurret = MAKE_SERVO(TRUE, E5, 1500, 875);You then can setup lists of these servos. Usually split by which one use hardware timers.On my Brat these lists looked like:Code: [Select]SERVO_LIST servos_PWM[] = {&svoRAnkle, &svoRKnee, &svoRHip, &svoLAnkle, &svoLKnee, &svoLHip, &svoTurret};SERVO_DRIVER bank1 = MAKE_SERVO_DRIVER(servos_PWM);To then initialize the servos you can make a call like:Code: [Select] servosConnect(&bank1);
madsci1016, I'll have you know that...this is EXACTLY what I am looking for!!! Damn, this painfully simple! It did take a little while for me to figure a couple of things out, but I got the hang of it now. Thank you foe recommending this awesome product and by "thank you", I mean... Thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyou!Yeah, I know...decaf!