Thread created automatically to discuss a document in CD-Media.
Victor Calibration code
Cross platform automatic victor calibration code.
Sometime during build, I wrote some code to automatically calibrate the victors. I’m releasing it under GNU GPL.
By using this, you can precisly calibrate your victors. If you’re having subtle problems with the robot not reacting as you’d like, run this before tweaking constants.
It cycles all the PWM values from 0 to 254 and back down, pausing at 0, 127, and 254. Pushing p1_sw_top (the top button on joystick 1). The current value is displayed on the user byte. Autonomous mode kills everything.
The code will compile for the 2004/2005 RC, 2006 RC, and the EDU bot (Robovation). Notice the seperate libraries and linker scripts for each one. It was developed in Eclipse, so there are no MPLAB project files. There are, however, makefiles.
Unhook all your motors
Go through each victor and calibrate it according to the directions, but instead of moving the joystick, run this (hit the button)
Download your code, turn off bot, and reconnect your motors
When it’s all done, allow it to run. All the LEDs should change together, in syncronicity. If one of them is off, it isn’t calibrated quite right. (When they’re all going at once, the off one sticks out.)
You may configure the timings and the switch at the top of user_routines.c.
This can also serve as a small template. The only reason ifi_utilities.c/.h is in there is because I use printf() once for initialization.
victor-calibrate.zip (464 KB)