Arduino Tutorials – Lesson 2 – Double LED blink using Arduino UNO

Creating Double LED blink program using Arduino UNO

Required Components

  1. Led -2 no
  2. Resistor 220Ω -2 no
  3. Arduino board -1 no
  4. Bread Board -1 no
  5. Connecting wires -1 set

Circuit

Steps

  1. Make sure the components are working properly.
  2. Connect Arduino board 5v and GND pin to the bread board by using wires.
  3. Connect 220 Ω Resistors to the each LED Anode (+) pin and both cathode (-) pin to Gnd.
  4. Connect Arduino 9, 10 pin to the each 220 Ω Resistors another end.
  5. Check the Arduino program.
  6. Check the circuit connections.
  7. Run the Arduino program.

Arduino Program

int led1 = 9;
int led2 = 10;

void setup()
{
  pinMode (led1, OUTPUT);
  pinMode (led2, OUTPUT;
}

void loop()
{
  digitalWrite (led1, LOW);
  digitalWrite (led2, HIGH);
  delay (500);
  
  digitalWrite (led1, HIGH);
  digitalWrite (led2, LOW);
  delay (500);
}

Usage

  1. Reading lights.
  2. Night lights.
  3. Security lights.

Leave a Reply

Your email address will not be published. Required fields are marked *