View Single Post
  #3   Spotlight this post!  
Unread 16-02-2010, 10:31
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: Another Switch Help Thread

For most switches, you'll have wiring options for NC and NO - normally closed and normally open. When wired to use the normally closed option, the switch "assumes" that when it is NOT pressed, it should make a connection, and when it is pressed, it shouldn't - in other words, it's false when not pressed, true when pressed. The normally open configuration is opposite.

Now, lets make sure things are wired up properly. Do you have a multimeter available? Set it to measure resistance, unplug the switch from the side car and put one probe on the ground wire from the switch, and the other on the signal wire - what do you see? Now have a friend depress the switch - what do you see? You should see infinite resistance (often represented by a "1" on the far left of the readout) in one case, and 0 (or close to it) in the other.

You can do a similar test with the photosensor to ensure it's working. However, it will need to be powered, and you'll want to check voltage between ground and the two signal wires - you should see it go between 0V and 5V.

Once you've eliminated the switch and the wires... Then i would suspect something with code, but as I'm pretty unfamiliar with the libraries for the cRio (I switched from being a programming mentor to an electrical mentor right before FIRST switched from IFI), I'm probably not the best person to help there.