IDPL - 3: LED Blinking with Arduino Uno
IDPL - 3: LED Blinking with Arduino Uno
Objective
To interface an LED with Arduino Uno and write a program to blink the LED at a fixed time interval.
Required Components
- Arduino Uno
- LED
- 220 Ω resistor
- Breadboard
- Jumper wires
- USB cable
Circuit Diagram
Board Connections
Pin Connections
| | | | - | -------------------------------------------- | | | Arduino Digital Pin 8 through 220 Ω resistor | | | | | | Arduino GND | | | |
Working PrincipleThe Arduino sets digital pin 8 as an output. When the pin is set to HIGH, approximately 5 V is applied to the LED through the resistor, causing the LED to glow. When the pin is set to LOW, the voltage is removed and the LED turns OFF. The 220 Ω resistor limits the current flowing through the LED and protects both the LED and Arduino output pin. The program alternates between HIGH and LOW with a delay of 1 second, producing a continuous blinking effect. Arduino Code// © 2025, Cognifront. Member of The IoT Kits Family.
// Experiment: LED Blinking with Arduino Uno
int ledPin = 8;
void setup() {
// Set LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn LED ON
digitalWrite(ledPin, HIGH);
delay(1000);
// Turn LED OFF
digitalWrite(ledPin, LOW);
delay(1000);
}
Observation
ResultThe LED was successfully interfaced with Arduino Uno and programmed to blink continuously at a 1-second interval. ConclusionThis experiment demonstrates basic digital output control using Arduino Uno. It introduces the use of pinMode(), digitalWrite(), and delay() functions for controlling an external electronic component. |