View Single Post
  #4   Spotlight this post!  
Unread 28-01-2010, 15:04
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,753
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Limit switch to solenoid problem

How you hooked it up is key here. It sounds to me like you may have wired the limit switch to short power and ground - this is bad. The Digital Sidecar contains an internal pull-up resistor on the digital IO ports - this means if you send no signal to the input, it will read as if 5V was sent. See page 19 of http://usfirst.org/uploadedFiles/Com...Rev1_enc .pdf

To wire a limit switch, take a standard PWM cable and wire the Black and the White wires to the switch in your preferred method (normally closed or normally open). The method used doesn't really matter - normally closed means you would see a 0 in the code when the switch is not pressed, a 1 when it is pressed. normally open is reverse. Do NOT hook up the red wire from the PWM. It's not needed (due to the pull up resistor), and if you mess up your wiring you could risk shorting it. It's better all around not to use it with the limit switches.