View Single Post
  #29   Spotlight this post!  
Unread 21-04-2012, 15:51
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,926
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Inovation First FRC Robot Controller

I forgot you were using the Watson code rather than the IFI default code.

In Teleop, if you're changing the OI LEDs, then be sure to comment out the line
Code:
Update_OI_LEDs();
To use a counter to time things just:
  1. Declare an unsigned int counter=0;
  2. Add a line to increase it by 1 every loop, e.g., counter++;
  3. Check to see if's a multiple of 38 (for one second or equal to 38 & reset it to zero).
  4. If it is a multiple then toggle the light state, e.g., Switch1_LED = !Switch1_LED;
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle