View Single Post
  #44   Spotlight this post!  
Unread 06-03-2006, 12:55
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: The 8.2 (or 8.3) Battery Voltage Bug

Quote:
Originally Posted by yoyodyne
Our code:

Uses a lot of structures with mixed char, int, and long types.

Uses Kevin Watson's serial port code.

Uses Timer 4 interrupt for a 5ms real time clock

Uses Kevin Watson's ADC with 5 analog channels each with a 200Hz rate for a 1KHz timer 2 interrupt

Points to structures and calls routines through pointers

Uses two additional shaft encoder interrupts

Assembles a lot of instrumentation data and sends that to the OI user variables, LED variables, and unused PWM outputs for data logging
Our original code was very complex, but by competition we had narrowed it down to code that
  • Uses Kevin's gyro code (which includes his serial code and adc code)
  • Uses Timer2 and the ADC interrupt
  • Uses two analog channels (the gyro and a selector switch for autonomous strategy)
  • No shaft encoders, weird pointers, or anything like that.

(although I like the idea of using a timer to make sure that you aren't bogging down on the loop execution)