Overview
In this lesson, you will master how to use buttons with digital inputs to turn LED on and off.
Components Required
Name
UNO R3 or MEGA 2560
5mm Red LED
Push Switches
Component Introduction
The switch is a simple component. When you press a button or flip a lever, they
connect two contacts together so that electricity can flow through them.
Actually, there are only really two electrical connections. Inside the switch
package, pins B and C are connected together as same as pins A and D.
Wiring Diagram
Result
Press the left button, the LED will be lit, and press the right button, LED will be extinguished.
Lesson 3 Digital Inputs-Switches
Qty
1
1
2
Name
220Ω Resistor
DuPont Wire
Breadboard
Qty
1
7
1
20
Need help?
Do you have a question about the Ultimate Starter Kit for Arduino and is the answer not in the manual?
Questions and answers