Push Button LED

Subscribe to our newsletter for an update when new projects are published. We would love to feature your project. Contact us for more information!

overview and Video

In this project you will learn how to wire a button to control the Arduino and have it turn on an LED light.

Unlike general use single board computers like the Raspberry Pi, the Arduino – like other microcontrollers – does not have an easy way to receive commands. That is, it lacks a simple human-machine interface. By programming your Arduino to respond to something like a button, you begin to harness the power of this microcontroller.

So, yes, this project helps familiarize you with the basics of circuits and switches. But more importantly, it gives you a taste of what you need to know to send a command to the Arduino.

This is project 1 from the Arduino Project Handbook, V1 by Mark Geddes.

We built this project on a WorkBench Project Development Kit from Phase Dock.




Pushbutton LED project

you will need

Major components

  • Arduino Uno

  • One 400 pin breadboard

  • “Always-on” battery (optional; this project can be powered from your computer)

Small components

  • Button, momentary tactile (we used the one in the Elegoo 37 Sensors Kit, V2.0)

  • LED light

  • Two resistors (10k ohm and 220 ohm)

  • Jumper wires

WorkBench 1007 Project Development Kit (PDK)

  • Two 2x3 Clicks

  • One Arduino Slide

  • Optional: one 2x3 or 1x3 Click depending on the size of your battery

  • Optional: 1007 Cover


Resources

Arduino Project Handbook, Volume 1, by Mark Geddes; this is Project 21


Get a WorkBench PDK from Phase Dock.


Elegoo 37 Sensor Kit, V2.0 (for the momentary tactile button)





IMG_2614.JPG

Tips

1. The button in the Elegoo Kit has a different format from the one shown in the Arduino Project Handbook. It functions exactly the same way, however. You may want to review the lesson on Breadboards found on pages 4-5 of the Arduino Project Handbook if you need a little guidance.

2. The fritzing diagram shows the LED toward the back — behind the button. We suggest reversing the position of the LED and the resistor as shown in one of the project photos in the handbook to bring the LED to a more visible position.

3. If the LED doesn’t light…you may have it in backwards. (LEDs are directional and they only work one way.)