|
Re: Wiring a limit switch.
if the limit switch is a double throw (has common, NO and NC) then you could connect 5V to NO, Gnd to NC, and the signal to common. The switch would then either switch the signal to 5v or ground. Be careful not to put 5v or gnd on the common terminal, or one state will give you a short.
Reversing 5V and ground would change polarity or just change in software.
Get the analog port for greatere or less than 2.5 volts.
__________________
Brian K
Team 1225 Robotics Mentor
|