Bean Summary
Here’s a
summary of all of the beans we haven’t previously mentioned:
This is the
interrupt we set up for wireless serial on the car; it goes at roughly 38250
baud and has methods for sending and receiving bytes through the module. This bean was essential for debugging.
This was the
timer used to tell the time between hall pulses to help estimate the speed of
the car. The timer was in microseconds
but could only return word precision, so we came up with a scheme that can get
it to double word precision by adding our own 1/20th second timer in
code and incrementing that every time this timer reached 50,000 microseconds.
This is the
interrupt for obstacle detection. On the
rising edge of the IR sensor, the software breaks into a routine away from line
steering that manually turns around an object to the left.
This is a
timer we used to set up PWM control to control the motor output using PID.
Used in
conjunction with MotorCycleTimer, this MotorOutput bit turns on and off the signal to the motor,
that gets buffered by a comparator to drive the motor at the chosen duty cycle
based on PID information.
This bean is
hooked directly to steering