This Arduino button circuit is a simple example that shows you how to connect buttons to an Arduino.
In this quickstart guide, you’ll learn how to connect a button to an Arduino board and read a HIGH or LOW depending if the button has been pushed or not. You’ll use the Light-Emitting Diode (LED) that is included on the board to turn on and off with the button so that you can verify that your button press code is working properly.
This is a great practice circuit to build as you’re learning Arduino. The code is straightforward and the connections are simple.
Parts Needed
- Arduino Uno
- Breadboard (and some breadboard wires)
- Resistor 10 kΩ (R1)
- Resistor 470 Ω (R2)
- Pushbutton or Switch
- Wires
Arduino Button Circuit
To connect a button to an Arduino, you’ll need a pull-down or a pull-up resistor. This is to make sure that when the button is not pushed, it has a defined value. In this example, we’re using a pull-down resistor of 10 kΩ.