LED Blinking

LED Blinking

LED Blinking

Component Required:

  • LED
  • Resistor 220 ohm
  • Jumper Wire (Male to Male/Male to Female)
  • Bread Board (Optional)
  • Arduino

Objective

The objective of this project is to create a program that blinks an LED on and off with a delay of one second using an Arduino microcontroller. This project aims to teach students how to:

  1. Understand the basic structure and syntax of an Arduino sketch.
  2. Use digital pins to control output devices like LEDs.
  3. Implement time delay functions in Arduino programming using the delay() function.
  4. Develop basic coding skills required for controlling electronic components with Arduino.

Programming Step:

Initialization of pin;

  • int L1=3;

pinMode();

  • pinMode(L1,OUTPUT);

Logic

  • digitalWrite(L1,HIGH);
  • delay(1000);
  • digitalWrite(L1,LOW);
  • delay(1000);

Programming

int L1 = 3;

void setup()

{

  pinMode(L1, OUTPUT);

}

void loop()

{

  digitalWrite(L1, HIGH);

  delay(1000);

  digitalWrite(L1, LOW);

  delay(1000);

}