View Single Post
  #7   Spotlight this post!  
Unread 12-03-2012, 19:07
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,795
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: REED SWITCH TROUBLE IN TELE-OP

The reed switch check will depend on if it's wired to be Normally-Closed (NC) or Normally-Open (NO). Many types of switches give you the option.

The code as you have it is good for a switch that's wired to be NO. The output of the DIO Get will be true when the switch is off and false when the switch is on.

You might still need to have your original check for when the joystick button is released, before allowing the sequence to queue up again.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote