Jump to content

IPDL - 3: LED Blinking with Arduino Uno

From cognifront

IPDL - 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

Component Connection
LED Anode (+) Arduino Digital Pin 8 (through 220 Ω resistor which is already fitted on the kit)
LED Cathode (-) Arduino GND

Working Principle

The 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

// © 2026, 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

  • The LED turns ON for 1 second.
  • The LED turns OFF for 1 second.
  • The ON/OFF cycle repeats continuously.
  • The LED therefore appears to blink at a regular interval.

Result

The LED was successfully interfaced with Arduino Uno and programmed to blink continuously at a 1-second interval.

Conclusion

This 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.