LED Blinking

 Arduino Project: LED Blinking

1. Introduction

This project demonstrates a simple LED blinking circuit using an Arduino. It is ideal for beginners to understand basic circuit design and Arduino programming. The LED will blink ON and OFF at a regular interval.

2. Components Required

·         Arduino Uno:

Microcontroller board based on the ATmega328P.

·         LED:

Light Emitting Diode to visually indicate the blinking.

·         Resistor (220 ohm):

To limit the current flowing through the LED.

·         Breadboard:

For building the circuit without soldering.

·         Jumper Wires:

To connect the components on the breadboard.

3. Circuit Diagram

Connect the components as follows:
- Connect the anode (long leg) of the LED to digital pin 13 on the Arduino.
- Connect the cathode (short leg) of the LED to one end of the resistor.
- Connect the other end of the resistor to the GND pin on the Arduino.

4. Arduino Code


void setup() {
  pinMode(13, OUTPUT); // Set pin 13 as output
}

void loop() {
  digitalWrite(13, HIGH); // Turn the LED on
  delay(1000);            // Wait for one second
  digitalWrite(13, LOW);  // Turn the LED off
  delay(1000);            // Wait for one second
}

5. Explanation

In the setup() function, pin 13 is configured as an OUTPUT. In the loop() function, the LED is turned ON by setting pin 13 to HIGH, waits for one second, then turned OFF by setting pin 13 to LOW, and waits another second. This cycle continues indefinitely, creating a blinking effect.