PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
This library has a functions you can call to calibrate your ActivityBot 360. Example code that uses this library to calibrate the ActivityBot is here:
http://learn.parallax.com/activitybot
Calibration instructions that accompany the example code are included in the tutorial.
More...
Go to the source code of this file.
Macros | |
#define | ABD60_PIN_CTRL_L 12 |
#define | ABD60_PIN_FB_L 14 |
#define | ABD360_PIN_CTRL_R 13 |
#define | ABD360_PIN_FB_R 15 |
#define | _AB360_EE_Start_ 63418 |
ActivityBot EEPROM calibration data start address. | |
#define | _AB360_EE_Pins_ 12 |
#define | _AB360_EE_mVccwL_ 28 |
#define | _AB360_EE_bVccwL_ 32 |
#define | _AB360_EE_mVcwL_ 36 |
#define | _AB360_EE_bVcwL_ 40 |
#define | _AB360_EE_mVccwR_ 44 |
#define | _AB360_EE_bVccwR_ 48 |
#define | _AB360_EE_mVcwR_ 52 |
#define | _AB360_EE_bVcwR_ 56 |
#define | _AB360_EE_End_ _AB360_EE_Start_ + 60 |
ActivityBot EEPROM calibration data end address. | |
#define | AB360_ERROR_NONE 0 |
#define | AB360_ERROR_CABLE_SWAP -1 |
#define | AB360_ERROR_NO_ENC_SIG_BOTH -2 |
#define | AB360_ERROR_NO_ENC_SIG_LEFT -3 |
#define | AB360_ERROR_NO_ENC_SIG_RIGHT -4 |
#define | AB360_ERROR_NO_MOTION_LEFT -5 |
#define | AB360_ERROR_NO_MOTION_RIGHT -6 |
#define | AB360_ERROR_NO_MOTION_BOTH -7 |
#define | AB360_ERROR_BATTERIES_TOO_LOW -8 |
#define | AB360_ERROR_BATTERIES_TOO_HIGH -9 |
#define | AB360_ERROR_XFER_OUT_OF_RANGE -10 |
#define | AB360_ERROR_POSSIBLE_AB_NOT_360 -11 |
#define | AB360_ERROR_CONDITION_UNKNOWN -12 |
Functions | |
void | cal_supply5V (int setting) |
void | cal_activityBot (void) |
Run the ActivityBot 360 calibration function. Let it run until the P26 and P27 lights turn off. It'll take about 30 seconds. More... | |
void | cal_servoPins (int servoPinLeft, int servoPinRight) |
Set the ActivityBot 360's servo pin connections to values other than the default P12 (left servo) and P13 (right servo). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the servos to be connected to the Propeller I/O pins specified by the servoPinLeft and servoPinRight parameters. More... | |
void | cal_encoderPins (int fbPinLeft, int fbPinRight) |
Set the ActivityBot 360's feedback pin connections to something other than the default P14 (left feedback) and P15 (right feedback). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the feedback pins to be connected to the I/O pins specified by the fbPinLeft and fbPinRight parameters. More... | |
void | cal_displayData (void) |
Display ActivityBot 360 calibration data in the terminal. This data consists of I/O pin values for the servo's control and feedback I/O pin connections and m and b values for a y = mx + b equation that is used to calculate control pulse widths based on measured calibration data. Details about how y, m, x, and b are calculated appear in the notes at the bottom of the terminal. | |
void | cal_displayResults (void) |
Indicates whether the last calibration was successful or had errors. Errors can be caused by turning off the ActivityBot 360 before the yellow lights go out, and also by incorrect servo control/feedback pin connections. | |
void | cal_clear (void) |
Clear calibration settings. After this function is called the abdrive360 library will use standard default settings. | |
int | cal_getEepromPins (void) |
This library has a functions you can call to calibrate your ActivityBot 360. Example code that uses this library to calibrate the ActivityBot is here:
http://learn.parallax.com/activitybot
Calibration instructions that accompany the example code are included in the tutorial.
Definition in file abcalibrate360.h.
void cal_activityBot | ( | void | ) |
Run the ActivityBot 360 calibration function. Let it run until the P26 and P27 lights turn off. It'll take about 30 seconds.
Run the ActivityBot 360 calibration function. Let it run until the P26 and P27 lights turn off. It'll take about 30 seconds.
Definition at line 44 of file abcalibrate.c.
void cal_encoderPins | ( | int | fbPinLeft, |
int | fbPinRight | ||
) |
Set the ActivityBot 360's feedback pin connections to something other than the default P14 (left feedback) and P15 (right feedback). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the feedback pins to be connected to the I/O pins specified by the fbPinLeft and fbPinRight parameters.
fbPinLeft | Number of Propeller I/O pin connected to the left encoder. |
fbPinRight | Number of Propeller I/O pin connected to the right encoder. |
Set the ActivityBot 360's feedback pin connections to something other than the default P14 (left feedback) and P15 (right feedback). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the feedback pins to be connected to the I/O pins specified by the fbPinLeft and fbPinRight parameters.
encPinLeft | Number of I/O pin connected to the left encoder. |
encPinRight | Number of I/O pin connected to the right encoder. |
Definition at line 787 of file abcalibrate.c.
void cal_servoPins | ( | int | servoPinLeft, |
int | servoPinRight | ||
) |
Set the ActivityBot 360's servo pin connections to values other than the default P12 (left servo) and P13 (right servo). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the servos to be connected to the Propeller I/O pins specified by the servoPinLeft and servoPinRight parameters.
servoPinLeft | Number of I/O pin connected to the left servo. |
servoPinRight | Number of I/O pin connected to the right servo. |
Set the ActivityBot 360's servo pin connections to values other than the default P12 (left servo) and P13 (right servo). This function stores values in EEPROM where the abdrive360 library can access them. So, the abdrive360 library will expect the servos to be connected to the Propeller I/O pins specified by the servoPinLeft and servoPinRight parameters.
servoPinLeft | Number of I/O pin connected to the left servo. |
servoPinRight | Number of I/O pin connected to the right servo. |
Definition at line 773 of file abcalibrate.c.