Buttons and switches
James McManus
30 May 2012
Many projects include physical buttons or switches of some kind. The basic principle is simple: Two wires are disconnected until the switch connects them, closing the circuit. (Sometimes the principle is inverted, where the circuit is closed by default and pushing a button opens the circuit until it's released.)
On the software side, you just check whether the signal pin is in a LOW
or HIGH
state, and branch accordingly.
Tags
- Read more about Buttons and switches
- Log in to post comments