View Single Post
  #1   Spotlight this post!  
Unread 19-01-2008, 09:40
robotrobot2's Avatar
robotrobot2 robotrobot2 is offline
Computer Overlord
FRC #0151 (Tough Techs)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Nashua NH
Posts: 14
robotrobot2 is on a distinguished road
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!
Attached Files
File Type: c timelibrary.c (777 Bytes, 81 views)
File Type: h timelibrary.h (92 Bytes, 42 views)
__________________
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.