20
Lesson 3 Digital Inputs-Switches
Overview
In this lesson, you will master how to use buttons with digital inputs to turn LED on and off.
Components Required
Name
Qty
Name
Qty
UNO R3 or MEGA 2560
1
220Ω Resistor
1
5mm Red LED
1
DuPont Wire
7
Push Switches
2
Breadboard
1
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.
Содержание Ultimate Starter Kit for Arduino
Страница 1: ......
Страница 2: ......
Страница 3: ......
Страница 17: ...17 Wiring Diagram Result LED is lit up and went out gradually like breathing...
Страница 24: ...24 Wiring Diagram Result The buzzer will ring for 2s and then mute for 2s...
Страница 26: ...26 Result The passive buzzer will play music and the LED blink simultaneously Wiring Diagram...
Страница 32: ...32 Wiring Diagram Result The stronger light the photoresistor received the more LEDs will light up...
Страница 74: ......
Страница 79: ...79 Wiring Diagram...