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
Figure 1 Define pictograms,easy to understand

diagram- programing
Figure 2 Set the diagram programing

Put-code-in-programing
Figure 3 Put code in programing

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

CODE

  1. void setup() {
  2.   pinMode(13, OUTPUT);
  3.   pinMode(12, OUTPUT);
  4. }
  5. void loop() {
  6.   digitalWrite(13, HIGH);
  7.   digitalWrite(12, LOW);
  8.   delay(1000);
  9.   digitalWrite(13, LOW);
  10.   digitalWrite(12, HIGH);
  11.   delay(1000);
  12. }

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

circuit-connectio
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- 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)

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