Professional Documents
Culture Documents
(Module 3)
Arduino Programming
Types of LEDs:
LED Electrical characteristics:
Item Symbol Absolute Maximum Rating
Forward Current IF 20mA
Peak Forward Current IFP 30mA
Suggestion Current ISU 14 - 18 mA
Forward Voltage VF 1.8 – 2.2 V
𝑉𝑠 − 𝑉𝐹 5𝑉 − 2𝑉
𝑅𝑠 = = = 100𝛺
𝐼𝐹 30𝑚𝐴
Activity
Draw the 2nd LED into the circuit diagram in series with first
LED. (2M)
Wire a breadboard LED light circuit to get two LEDs to light
up which are in series. (2M)
What happens to the brightness of the LEDs. (2M)
Evaluate and reconstruct the circuit to overcome the problem
of the brightness of the LEDs. (4M)
Assessment Process:
Question TLO Addressed CO Addressed
1 TLO 4 CO 1
2 TLO 4 CO 1
3 TLO 4 CO 1
4 TLO 4 CO 1
Connection of LED to an Arduino board:
VCC
222 Ohm
13
PIN 222 Ohm
LED
11
ARDUINO BOARD PIN
Equipment's Required:
SOURCE CODE:
void setup()
{
// put your setup code here, to run once:
pinMode(13,OUTPUT); //Configure digital pin 13 as output
}
void loop()
{
//put your main code here, to run repeatedly:
digitalWrite(13,HIGH); //To make LED ON connected to pin 13
}
CIRCUIT: 222 Ohm
13
PIN
LED
ARDUINO BOARD
Equipment's Required:
1. Personal computer/Laptop/Mobile
2. Arduino software
3. Arduino Mega 2560 board
4. Universal Serial Bus(USB) Cable
5. Bread Board
6. Connecting Wires
7. Push button Switch
8. Light Emitting Diode(LED)
9. Resistor(220Ω)
Connection of LED to an Arduino board:
VCC
222 Ohm
13
PIN 222 Ohm
LED
11
ARDUINO BOARD PIN
8
222 Ohm PIN
switch
8
PIN 222 Ohm
ARDUINO BOARD
switch
ARDUINO BOARD
Questions…..?