Push Button
In this project, you'll learn how to connect and use a push button to manually turn on and off a LED.
A push button is a simple on-off switch for turning on and off an electric signal. Press the button to turn on and release the button to turn off.
Parts needed:
| ||
1 | Making the connections
Be careful with the orientation of the 4 legs on the push button:
| |
Use legs 1 and 2 of the push button for this project.
| ||
2 | Create a new program and type in this program.
The push button is connected to pin 2. We will control the internal LED that is connected to pin 13. The The The | |
3 | Run the program.
Press and release the push button and observe the internal LED on the Arduino board. | |