|
Re: Wiring a limit switch.
Just one more option to consider:
If you're out of Digital I/O ports (like I was this year), you can also wire to the analog breakout. Connect +5v and Signal when the limit switch is engaged, and then check in code whether the analog channel reads above or below 2.5V.
Something you have to remember about programming Jon's first option: the channel will read 1 unless signal and ground are connected, in which case it would read zero. That confused me for a while when our limit switches did not work as programmed.
|