abcalibrate library  v0.91
Self calibration library for the Parallax ActivityBot
Macros | Functions
abcalibrate.h File Reference

This library has a function you can call to calibrate your ActivityBot. 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 "servo.h"
#include "simpletools.h"
#include "fdserial.h"

Go to the source code of this file.

Macros

#define _ActivityBot_EE_Start_   63418
 ActivityBot EEPROM calibration data start address.
#define _ActivityBot_EE_Pins_   12
#define _ActivityBot_EE_Trims_   28
#define _ActivityBot_EE_Left_   52
#define _ActivityBot_EE_Right_   1052
#define _ActivityBot_EE_End_   63418 + 2052
 ActivityBot EEPROM calibration data end address.

Functions

void cal_activityBot ()
 Run the ActivityBot calibration function. Let it run until the P26 and P27 lights turn off. It'll take about 1 minute, 20 seconds.
void cal_servoPins (int servoPinLeft, int servoPinRight)
 Set the ActivityBot's servo pin connections to something other than the default P12 (left servo) and P13 (right servo). This function stores values in EEPROM where the abdrive library can access them. So, the abdrive library will expect the servos to be connected to the I/O pins specified by the servoPinLeft and servoPinRight parameters.
void cal_encoderPins (int encPinLeft, int encPinRight)
 Set the ActivityBot's servo pin connections to something other than the default P14 (left encoder) and P15 (right encoder). This function stores values in EEPROM where the abdrive library can access them. So, the abdrive library will expect the encoders to be connected to the I/O pins specified by the encPinLeft and encPinRight parameters.

Detailed Description

This library has a function you can call to calibrate your ActivityBot. 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 2 additional cores, and self-terminates the application when done.
EEPROM Usage
Writes to addresses 63418..65470.
Memory Models
Use with CMM.
Version
0.91
  • add cal_servoPins and cal_encoderPins to change from default I/O connections to ActivityBot servos and encoders. Values used will persist in EEPROM and be used by the abdrive library.
v0.90
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  encPinLeft,
int  encPinRight 
)

Set the ActivityBot's servo pin connections to something other than the default P14 (left encoder) and P15 (right encoder). This function stores values in EEPROM where the abdrive library can access them. So, the abdrive library will expect the encoders to be connected to the I/O pins specified by the encPinLeft and encPinRight parameters.

Parameters
encPinLeftNumber of I/O pin connected to the left encoder.
encPinRightNumber of I/O pin connected to the right encoder.
void cal_servoPins ( int  servoPinLeft,
int  servoPinRight 
)

Set the ActivityBot's servo pin connections to something other than the default P12 (left servo) and P13 (right servo). This function stores values in EEPROM where the abdrive library can access them. So, the abdrive library will expect the servos to be connected to the 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.