3 void interpolation_table_setup(
void);
4 void set_drive_speed(
int left,
int right);
6 volatile unsigned int _servoPulseReps;
7 volatile int abd_speedL;
8 volatile int abd_speedR;
16 int leftTemp, rightTemp;
17 int sprOld = _servoPulseReps;
19 if(left > abd_speedL + abd_rampStep) leftTemp = abd_speedL + abd_rampStep;
20 else if(left < abd_speedL - abd_rampStep) leftTemp = abd_speedL - abd_rampStep;
23 if(right > abd_speedR + abd_rampStep) rightTemp = abd_speedR + abd_rampStep;
24 else if(right < abd_speedR - abd_rampStep) rightTemp = abd_speedR - abd_rampStep;
25 else rightTemp = right;
28 while(sprOld >= _servoPulseReps);
29 sprOld = _servoPulseReps;
38 interpolation_table_setup();
39 set_drive_speed(0, 0);
43 while((left != abd_speedL) || (right != abd_speedR))
This library takes care of encoder monitoring and servo signalling, and provides a simple set of func...
void drive_ramp(int left, int right)
Ramp up to the specified wheel speeds. It works almost the same as drive_speed, except that it steps ...
void drive_rampStep(int left, int right)
This funciton allows your code to ask for a speed repeatedly in a loop, but each time your code asks ...
void drive_speed(int left, int right)
Set wheel speeds in encoder ticks per second. An encoder tick is 1/64th of a revolution, and makes causes the wheel to roll 3.25 mm.