Blink 2 LED flasher using Arduino

Today we will make a 2 LED flasher using Arduino (UNO)

Usual we use a transistors circuit to make two LED flasher. This we will study programing C code on Arduino. It is easy to learn. Step to step by Chayapol. Lets go!

Define pictograms of LED blinking  working


Figure 1 Define pictograms,easy to understand

diagram programing Arduino


Figure 2 Set the diagram programing

Put code in programing


Figure 3 Put code in programing

Read also: DIY Flashing Bicycle LED Taillight Circuit

Then, we open the Arduino IDE software. Next,write the code below

CODE

void setup() {
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
}
void loop() {
  digitalWrite(13, HIGH);
  digitalWrite(12, LOW);
  delay(1000);
  digitalWrite(13, LOW);
  digitalWrite(12, HIGH);
  delay(1000);
}
Programing on Arduino-IDE


Figure 4 programing on Arduino IDE

And then, when you’re done. Press Ctrl+R to Compile. For check it.

Parts you will need:
Arduino
2X LEDs
2X 470 ohm resistor
jumper wires

2 LED flasher Arduino circuit connection


Connect the parts as Figure 5
Then, apply USB port to computers
Finally, Click to Sketch>Upload code to the arduino board.
We will see 2 LEDs alternately blink as Figure 6.

Blink 2 LED flasher circuit using Arduino

And video below

-First we set time delay is 1 S
-Second we set time delay is 0.1 S (LED flasher faster)
-Third we set time delay is 3 S (LED flasher slowly)

Related circuit: 1.5V LED flasher circuit using transistor, output one LED to 5 LEDs with only one AAA battery.

we can use Arduino to make a 2 LED flasher but we have to adapt the We can use Arduino to make two flsher lights, LED work light, which is controlled by the internal code Arduino. Good luck

GET UPDATE VIA EMAIL

I always try to make Electronics Learning Easy.

Get Ebook: Simple Electronics Vol.4