Button
—
filed under:
Beginners,
Digital I/O
Control an LED using a button.
| Level Description Parts Download Links Notes |
Beginners An LED is turned on when you press a pushbutton. 1 Arduino 1 LED 1 Pushbutton 1 Resistor (2.2 KOhms) button.zip (contains Fritzing files, Eagle files, Arduino code) http://www.arduino.cc/en/Tutorial/Button A wire goes from one leg of the pushbutton through a pull-down resistor (2.2 KOhms) to ground. A second wire goes from the corresponding leg of the pushbutton to 5 volt supply. A third wire connects to a digital i/o pin (pin 2) which reads the button's state. |
