Quote:
|
Originally Posted by doyler
My team wants me to rewrite our nasty autonomous code from last year and I decided I need to learn state machines, does anyone know where I can learn these
|
Have a look at the programming white papers, there are several.
One of the sections of "Introduction to C Programming for FIRST
robotics," the most recent version can be obtained from the Technical
section at
www.srvhsrobotics.org is specifically on state machines.
If you want to see a few hundred lines of state machine code that uses
time, measured distance, measured gyro angle, positions an arm
with analog feedback, and looks at switches on a robot to select among
autonomous modes, I'll put our control code up from last year for you
to go through. It won't take you long at all to master state machine
programming.