Thread: Timer Function
View Single Post
  #4   Spotlight this post!  
Unread 26-01-2008, 22:03
jacobhurwitz jacobhurwitz is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryland
Posts: 45
jacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura aboutjacobhurwitz has a spectacular aura about
Re: Timer Function

Quote:
Originally Posted by Tanner View Post
Hello all,

The programming team on our team is trying to get a timer function where we can run this code every x seconds or something like that.

We've searched high and low and have not been able to find a good timer code that works for us. Does anybody have any timer code that works without having a degree in nuclear physics to install and use?

Thanks
-Tanner
This year, out team is using WPILib. It greatly simplifies the use of most everything, including timers. Read page 53 of the manual for details.

What I love about WPILib is it has simple code for timers, gyros, ultrasonic sensors -- just about everything. But it was also easy to switch our code to WPILib, since you don't have to use their simplified functions if you don't want to. Instead of using SetPWM(1, 127), you can still say pwm01=127 if you want. I highly recommend using WPILib.