|
Robot Timing Code
Here's some timing code for a robot using the PIC processor. To use it link call() to the TMR0 overflow interrupt. Wait() delays the rest of the code for a number of seconds equal to the inputed float. Gettime() returns the current time in seconds since the robot started. Please post any comments!
__________________
Everything can always be blamed on software:
The claw can't pick up the trackball-
programmers must have messed up the claw function.
The driver crashes the robot into a wall-
the drive code must not be responsive enough.
The robot repeatedly displays "HELLO WORLD"-
that probably is software.
Last edited by robotrobot2 : 19-01-2008 at 11:54.
|