Site Navigation

Your Account

Choose Language

Introduction

This circuit uses an LED, button and resistor to turn an LED on and OFF.

Tools

No tools required.

Video Overview

Inser an LED into the breadboard with the Anode (positive leg) on the left and the Cathode (negative leg on the right).
  • Inser an LED into the breadboard with the Anode (positive leg) on the left and the Cathode (negative leg on the right).

Add Comment

Insert a 220 Ohm Resistor so that one leg is inline with the LED's Cathode leg. Resistors are not polarised, so orientation doesn't matter.
  • Insert a 220 Ohm Resistor so that one leg is inline with the LED's Cathode leg.

  • Resistors are not polarised, so orientation doesn't matter.

  • This resistor will be used to limit the current going to our LED.

Add Comment

Insert your push button so that one leg is in line with the other end of the resistor.
  • Insert your push button so that one leg is in line with the other end of the resistor.

  • Be sure to really push down on the push button so that the bottom of the push button is flush with the breadboard (this will feel like you're pushing too hard).

Add Comment

Connect Pin 13 to the Anode of the LED.
  • Connect Pin 13 to the Anode of the LED.

Add Comment

Connect the Resistor to Ground.
  • Connect the Resistor to Ground.

Add Comment

Connect the Push Button to Pin 7.
  • Connect the Push Button to Pin 7.

Add Comment

  • Upload this code to your Arduino.

  • When you run this code, the LED on Pin 13 will turn on when the button is held down. That is all.

Add Comment

  • Upload this code to your Arduino.

  • This program will toggle on and off the LED every time you push the button.

Add Comment

Conclusion

At then end of this lesson you should be able to turn a LED on and off with your button.

16 other people completed this guide.

Madeleine Schappi

Member since: 09/27/2017

4,557 Reputation

55 Guides authored

Team

Advent Edit Member of Advent Edit

Community

3 Members

55 Guides authored

2 Comments

Hi Madeleine,

Previously we have used the 5V pin and the GND pin on the Arduino to create the circuit. Why did we only use GND this time?

leeob1 - Reply

The light turns on! The light turns off! I am having fun!

john Zuill - Reply

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 1

Past 30 Days: 2

All Time: 287