70 #if defined(__cplusplus) 74 #include "simpletools.h" 75 #include "simpletext.h" 85 #ifndef _ActivityBot_EE_Start_ 90 #define _ActivityBot_EE_Start_ 63418 93 #ifndef _ActivityBot_EE_Pins_ 94 #define _ActivityBot_EE_Pins_ 12 97 #ifndef _ActivityBot_EE_Trims_ 98 #define _ActivityBot_EE_Trims_ 28 101 #ifndef _ActivityBot_EE_Left_ 102 #define _ActivityBot_EE_Left_ 52 105 #ifndef _ActivityBot_EE_Right_ 106 #define _ActivityBot_EE_Right_ 1052 109 #ifndef _ActivityBot_EE_End_ 114 #define _ActivityBot_EE_End_ 63418 + 2052 131 #define AB_BACKWARD -1 383 #if defined(__cplusplus) void drive_getTicksCalc(int *left, int *right)
Get the calculated number of ticks the encoders should have traveled.
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_goto(int distLeft, int distRight)
Make each wheel go a particular distance. Recommended for straight forward, backward, turns and pivots. Not recommended for curves. This function ramps up to full speed if the distance is long enough. It holds that speed until it needs to ramp down. After ramping down it applies compensation. This function is primarily a convenience for dead reckoning, and does not return until the maneuver has completed.
void drive_close(void)
Stop the servo/encoder system. This is useful for reclaiming a processor for other tasks...
void drive_trimSet(int direction, int side, int value)
Stores trim values to EEPROM.
void drive_setMaxSpeed(int speed)
Modifies the default maxiumum top speed for use with encoders. The default is 128 ticks/second = 2 re...
void drive_servoPins(int servoPinLeft, int servoPinRight)
Set servo pins to values other than the default P12 for left servo and P13 for right servo...
void drive_feedback(int enabled)
Enables or disables encoder feedback for speed control.
int drive_open()
Start or restart the servo/encoder system.
void drive_distance(int left, int right)
Make the ActivityBot wheels roll certain encoder tick distances. An encoder tick is 1/64th of a wheel...
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_displayInterpolation(void)
Displays the interopolation table stored in EEPROM by the calibration step. For more info...
void drive_encoderPins(int encPinLeft, int encPinRight)
Set encoder pins to values other than the default P14 for left encoder and P15 for right encoder...
void drive_getTicks(int *left, int *right)
Get the measured number of ticks the have traveled.
void drive_trimDisplay(void)
Display the trim settings.
void drive_setRampStep(int stepsize)
Overrides the default 4 ticks/second per 50th of a second for ramping.
void drive_trim(int enabled)
Enables or disables drive trim which can be used to compensate for mechanical wheel alignment errors...
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.