Thread: EEPROM Problems
View Single Post
  #9   Spotlight this post!  
Unread 27-01-2005, 15:07
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: EEPROM Problems

Quote:
Originally Posted by Mike Soukup
We did this last year for calibration values of the pots on our arms & crab wheels. We had a calibration mode that would read pot values at certain positions (in the case of crab it was center, full left, and full right) and store them off in EEPROM. Whenever the controller started up we would read those values from EEPROM and store them in a local calibration values structure so they were available to the crab/arm control routines as limit points.

This library of code was a huge time saver for the SW team because the procedure for calibrating a pot changed from: download debug code to read pot values, move crab/arm to endpoints & read values, change endpoint constants in header file, download code with new constants; to: put robot in calibrate mode and tap a button when crab/arm is at each endpoint, reset. It meant the pit crew could swap out a broken pot and calibrate it without a SW team member there. Best piece of SW we wrote in my opinion.

I also recommend adding a joystick calibration mode that prints the raw joystick values on the OI display. It saved our team when we needed to swap out a broken joystick while in line for our match. The drivers were able to center the stick without special debug software.

If there's interest & I get some time I'll write up a more detailed post explaining how we did all this.
I'm using it for something very similar to the joystick stuff. It detects the joystick center and its maximum possible range, and calculates deadbands off that. When I get it working correctly I can post it. I found an improved version of the eeprom code later in that thread, and I'll try that out tonight. Thanks for the help.