When adding non latching push buttons to an arduino, it's not obvious from the button itself how the signal flows through its prongs. In the image below, top two prongs are shorted, and the bottom two are shorted. The switch essentially joins the top to the bottom when pressed.
Traditional methods of wiring for these buttons are as shown. A pull-down resistor method on the left, and a pull-up resistor method on the right.
Making a quick perf-board setup can make adding a button to a breadboard super fast without having to re-remember how to wire the prongs. In this example I used a 10k resistor.
No comments:
Post a Comment