Controlling a LED with a button

In this lesson, we will learn how to detect the state of a button, and then toggle the state of the LED based on the state of the button.

Sep 28, 2020

9212 views

1 respects

Devices & Components

1

Arduino Uno Rev3

1

Pushbutton switch 12mm

1

Breadboard (generic)

1

LED (generic)

1

Resistor 10k ohm

1

Jumper wires (generic)

1

Resistor 220 ohm

Software & Tools

Arduino IDE

Project description

Code

_02_ButtonAndLed.ino

arduino

Downloadable files

capture_fQgeQ4j0ps.PNG

capture_fQgeQ4j0ps.PNG

capture_fQgeQ4j0ps.PNG

capture_fQgeQ4j0ps.PNG

Comments

Only logged in users can leave comments

arohansenroy

0 Followers

0 Projects

0