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)