Hi,
I’m working on an automated chicken coop door. The door is powered by a DC motor. When a light sensor tells the door to open, the DC motor will wind up a pulley and pull the door up. I want the door to hit a limit switch at the top when the door is opened so it knows when to stop the DC motor. Right now, I have these limit “switches” programmed with simple momentary push buttons from the Arduino kit.
I bought SPDT switches from Amazon (https://www.amazon.com/Gikfun-V-156-1C2 … 2470955011). I want to use these SPDT switches to be the trigger to tell the Arduino to stop the DC motor when it’s open or closed.
Unfortunately, I have no idea how to wire these switches or have them act like momentary buttons like the ones from Arduino box. Could someone please help me understand the wiring of these switches so they basically tell the Arduino if they are in state 1 or state 0 (clicked or unclicked)?
Thanks so much in advance!
Ravi