0% found this document useful (0 votes)
7 views

2.LED Control

The document provides an overview of LED control using an Arduino board, including the introduction to LEDs, their polarity, and how to connect them to the Arduino. It details the materials needed and the steps to set up the hardware, as well as coding instructions for controlling the LEDs using the digitalWrite() function. The exercise involves creating a sketch to alternate the LED states every second.

Uploaded by

Minh Tam Pham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

2.LED Control

The document provides an overview of LED control using an Arduino board, including the introduction to LEDs, their polarity, and how to connect them to the Arduino. It details the materials needed and the steps to set up the hardware, as well as coding instructions for controlling the LEDs using the digitalWrite() function. The exercise involves creating a sketch to alternate the LED states every second.

Uploaded by

Minh Tam Pham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

LED Control

HW Setup for LED Control

1. Introduction on LED
2. Materials
3. Connecting Arduino Board and LED
Introduction of LED
What is LED?

LED I Light Emitting


Diode ㅌ

“ Used for lighting instead of fluo- ”


rescent lamps, traffic lights,
computer screens, televisions,
and electronic signs
Introduction of LED
Polarity of LED
Epoxy Lens /
Case
Wire Bond
Reflective
Cavity
Semiconduct

or Die
Anvi
l Leadfra Polarity LED
Pos me
t
Flat
Spot Anode,
Cathode
Anod Cathod
e e
[ 출처 : Wikimedia]
Introduction of LED
Polarity LED
How to differentiate LED’s polarity

Long means Positive


Short means Negative

Without Straight, +
With Straight, -

Narrow Square, +
Wide Square, -
Introduction of LED
Symbol of LED

LED Symbol

To design HW, must know and interpret schematics

Anod Catho All electronic components have a special symbol indicat


e de
on the circuit diagram

Diode symbol indicating direction has an arrow indicatin


That light is emitted
Materials

[ 출처 : Pixabay, Fritzing]
Materials


Connecting Arduino Board and LED
Connect Arduino Digital Pin and LED
Connect LED on Breadboard and
Resistor, Jumper Wire

[ 출처 : Fritzing]
Connecting Arduino Board and LED
Connect Arduino Digital Pin and LED
GND Pin
Ground
Connect for Arduino Board and
Breadboard for common ground ㅌ

[ 출처 : Fritzing]
Connecting Arduino Board and LED
Connect Arduino Digital Pin and LED
D2, D3 Pin
Connect D2 pin to Red LED’s +
Connect D3 pin to Green LED’s +

[ 출처 : Fritzing]
Connecting Arduino Board and LED
Connect Arduino Digital Pin and LED
Resistor
Red, Green LED’s Negative connects to
Resistor
Connect Resistor to Ground ㅌ

[ 출처 : Fritzing]
Connecting Arduino Board and LED
Connect Arduino Digital Pin and LED
By connecting, D2 and D3,
LED is now controllable
Hardware

[ 출처 : Fritzing]
LED Control Exercise

1. LED Control Sketch Coding


LED Control Sketch Coding
Explanation By using digitalWrite() function, D2 pin and D3 pin are alternately made LOW
and HIGH with an interval of 1sec

setup() Function configur-


ing output of D2, D3 pin to
LED
loop() Function, ㅌ

digitalWrite() allows D2, D3


pin to alternately made Low
and High with an interval of
1 sec.

On/Off Infinite repeat on 1


sec interval



You might also like