View Single Post
  #2   Spotlight this post!  
Unread 16-02-2008, 17:25
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,740
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: Programing IR board problem

If the relay is a single solenoid you might need to add:
relay1_rev = 0;

If it's a double solenoid then depending on how it's wired it might possibly be:
relay1_fwd = 0;
relay1_rev = 1;

How is counter initialized?
Make sure you made counter either global or static and initialized the value to zero, otherwise, counter will be zero everytime this gets executed and it will go on forever.

Resetting counter to zero will just continue the loop endlessly.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-02-2008 at 17:28.