abcalibrate360 library  v0.9.1
Optional calibration library for the Parallax ActivityBot 360
Functions
abcalibrate360.h File Reference

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...

#include "simpletools.h"
#include "servo360.h"

Go to the source code of this file.

Functions

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.
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.
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.
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.

Detailed Description

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.

Author
Andy Lindsay
Core Usage
A call to cal_activityBot launches 1 additional core, and self-terminates the application when done.
EEPROM Usage
Writes to addresses 63418..65470.
Memory Models
Use with CMM.
Version
v0.90
  • add cal_servoPins and cal_encoderPins to change from default I/O connections to ActivityBot 360 servos and feedback lines. Values used will persist in EEPROM and be used by the abdrive360 library.
Help Improve this Library
Please submit bug reports, suggestions, and improvements to this code to edito.nosp@m.r@pa.nosp@m.ralla.nosp@m.x.co.nosp@m.m.

Function Documentation

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.

Parameters
fbPinLeftNumber of Propeller I/O pin connected to the left encoder.
fbPinRightNumber of Propeller I/O pin connected to the right encoder.
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.

Parameters
servoPinLeftNumber of I/O pin connected to the left servo.
servoPinRightNumber of I/O pin connected to the right servo.