HomeArduino ProjectsLED Chaser Circuit using Arduino

LED Chaser Circuit using Arduino

-

‘Arduino

LED Chaser Circuit using Arduino UNO Atmega328P Microcontroller

When it Comes to LED Chaser the only IC that came to our mind is a CD4017 Decade counter. But today in this article we are using a microcontroller for chasing the LEDs. The CD4017 has only 10 outputs but for the microcontroller Chaser, we have 12 LEDs for running.
And if you know a little bit about Arduino programming then you can also modify the project with new modes. You can customize as you wish.

I wanted to make the LED chaser circuit more professional so here is our sponsor JLC PCB. JLC PCB is the world’s No1 PCB manufacturers in China. you can order 2 layers, 3 layers 6 layers, PCBs from their site. The price is 2$ for 2 layers, 10 PCBs.

Here we are using the Atmega328p microcontroller. It has lots of GPIO pins in between all pins for LED chaser work. On behalf of that, we are using 12 pins for the 12 LEDs.
The codes which are used in Arduino are basically c+ program.

Components Lists From Utsource:

Tools Needed:

 

Watch the YouTube Video:

Here is our YouTube channel’s video. You can also watch the video for better understanding. Feel free to subscribe to our YouTube channel and don’t forget to press the bell icon.

 

 

Advantages of the circuit:

  • 12 LEDs for LED Chaser
  • FTDI Breakout Point.
  • The program can be updated and more new modes can be added.
  • Push button feature: You can change between different modes through pressing the pushbutton.
  • Wide voltage range operations: 9 to 35V power supply.

Disadvantages:

  • No Reverse polarity protection.
  • No Under voltage protection.
  • No Over Voltage protection.

But you Wouldn’t need these features if you know what you are doing.

Circuit Schematics:

Arduino LED Chaser Circuit with code

How to program Atmega328P?

There are 2 methods available for this case

  1. Just remove your Arduino IC insert a new IC into the IC socket and just program it. This is the laziest way of updating the process.
  2. Just take an FTDI breakout board and use the board pins to program the Arduino.

I have used the 1st process I removed the IC and inserted a new IC for programming the IC.

Some Pictures of the Project:

 

How to make it?

First I made the circuit diagram in EasyEDA software. Then I designed the PCB from convert to PCB option. I generated Garber for the PCB. At next I opened the JLC PCB website and uploaded the Garber file. And I ordered 10 pieces of PCB just only for 2$. After 5 days I have received my PCB. The PCB quality is just great. For this, I have to thank the JLC PCB website.

For the components section, I have gone with UTSOURCE. They are one of the largest component suppliers in China. They offer different types of components such as Resistors, Capacitors, ICs and many other things. You will get exclusive discounts If you order from them. So, why you are waiting for? Place your first order from UTSOURCE.

Then I collected all the components. I used a soldering iron for soldering all the components. I am using a fine bit soldering iron for all this project.

After 30 minutes of soldering the project is finally Came to an end. I programmed the Arduino atmega338p through Uno Board. Then removed the IC from the socket and connected on the PCB socket. Connected 9V Battery 🔋 in the screw terminal. The LEDs became started chasing as I have coded before into the atmega328P.

Download Links for LED Chaser Circuit using Arduino:

You can also read our other article Custom YouTube Play button for 50,000 Subscribers.

/*
Code Name:    Arduino 12 LED Chaser
URI:          https://circuitbest.com
Description:  LED Chaser with Different Modes.
Version:      1.0
Author:       Creative Creator
Author URI:   https://www.youtube.com/channel/UCJoXoKcfAo4j9XWDlxCWMyg
***CopyRight By Creative Creator***
***Non-commercial Use Only***
*/

int delayTime;
void setup(){
  pinMode(2, OUTPUT);  
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT); 
}

void loop(){
  

  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  
  digitalWrite(2,LOW);
  delay(100);
  digitalWrite(3,LOW);
  delay(100);
  digitalWrite(4,LOW);
  delay(100);
  digitalWrite(5,LOW);
  delay(100);
  digitalWrite(6,LOW);
  delay(100);
  digitalWrite(7,LOW);
  delay(100);
  digitalWrite(8,LOW);
  delay(100);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(10,LOW);
  delay(100);
  digitalWrite(11,LOW);
  delay(100);
  digitalWrite(12,LOW);
  delay(100);
  digitalWrite(13,LOW);
  delay(100);
  
  digitalWrite(13,HIGH);
  delay(100);
  digitalWrite(2,HIGH);
  delay(100);
  digitalWrite(12,HIGH);
  delay(100);
  digitalWrite(3,HIGH);
  delay(100);
  digitalWrite(11,HIGH);
  delay(100);
  digitalWrite(4,HIGH);
  delay(100);
  digitalWrite(10,HIGH);
  delay(100);
  digitalWrite(5,HIGH);
  delay(100);
  digitalWrite(9,HIGH);
  delay(100);
  digitalWrite(6,HIGH);
  delay(100);
  digitalWrite(8,HIGH);
  delay(100);
  digitalWrite(7,HIGH);
  delay(100);
  
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  
  digitalWrite(13,LOW);
  delay(100);
  digitalWrite(12,LOW);
  delay(100);
  digitalWrite(11,LOW);
  delay(100);
  digitalWrite(10,LOW);
  delay(100);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(8,LOW);
  delay(100);
  digitalWrite(7,LOW);
  delay(100);
  digitalWrite(6,LOW);
  delay(100);
  digitalWrite(5,LOW);
  delay(100);
  digitalWrite(4,LOW);
  delay(100);
  digitalWrite(3,LOW);
  delay(100);
  digitalWrite(2,LOW);
  delay(100);
  
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  
  digitalWrite(13,LOW);
  delay(100);
  digitalWrite(2,LOW);
  delay(100);
  digitalWrite(12,LOW);
  delay(100);
  digitalWrite(3,LOW);
  delay(100);
  digitalWrite(11,LOW);
  delay(100);
  digitalWrite(4,LOW);
  delay(100);
  digitalWrite(10,LOW);
  delay(100);
  digitalWrite(5,LOW);
  delay(100);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(6,LOW);
  delay(100);
  digitalWrite(8,LOW);
  delay(100);
  digitalWrite(7,LOW);
  delay(100);
  
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  
  digitalWrite(11,LOW);
  delay(100);
  digitalWrite(12,LOW);
  delay(100);
  digitalWrite(13,LOW);
  delay(100);
  
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  
  digitalWrite(8,LOW);
  delay(100);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(10,LOW);
  delay(100);
  
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  
  digitalWrite(5,LOW);
  delay(100);
  digitalWrite(6,LOW);
  delay(100);
  digitalWrite(7,LOW);
  delay(100);
  
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  
  digitalWrite(2,LOW);
  delay(100);
  digitalWrite(3,LOW);
  delay(100);
  digitalWrite(4,LOW);
  delay(100);
  
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(2, LOW);
  delay(100);
  
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  
  digitalWrite(2, LOW);
  delay(100);
  digitalWrite(2, HIGH);
  delay(100);
  digitalWrite(3, LOW);
  delay(100);
  digitalWrite(3, HIGH);
  delay(100);
  digitalWrite(4, LOW);
  delay(100);
  digitalWrite(4, HIGH);
  delay(100);
  digitalWrite(5, LOW);
  delay(100);
  digitalWrite(5, HIGH);
  delay(100);
  digitalWrite(6, LOW);
  delay(100);
  digitalWrite(6, HIGH);
  delay(100);
  digitalWrite(7, LOW);
  delay(100);
  digitalWrite(7, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(9, LOW);
  delay(100);
  digitalWrite(9, HIGH);
  delay(100);
  digitalWrite(10, LOW);
  delay(100);
  digitalWrite(10, HIGH);
  delay(100);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(11, HIGH);
  delay(100);
  digitalWrite(12, LOW);
  delay(100);
  digitalWrite(12, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  digitalWrite(13, HIGH);
  delay(100);
  
  digitalWrite(13,LOW);
  delay(100);
  digitalWrite(12,LOW);
  delay(100);
  digitalWrite(11,LOW);
  delay(100);
  digitalWrite(10,LOW);
  delay(100);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(8,LOW);
  delay(100);
  digitalWrite(7,LOW);
  delay(100);
  digitalWrite(6,LOW);
  delay(100);
  digitalWrite(5,LOW);
  delay(100);
  digitalWrite(4,LOW);
  delay(100);
  digitalWrite(3,LOW);
  delay(100);
  digitalWrite(2,LOW);
  delay(100);

  //newly added

  delayTime = 100;   //0 means Analog Input A0
  digitalWrite(2, HIGH);  delay(delayTime);
  digitalWrite(2, LOW);  delay(delayTime);
  digitalWrite(3, HIGH);  delay(delayTime);
  digitalWrite(3, LOW);  delay(delayTime);
  digitalWrite(4, HIGH);  delay(delayTime);
  digitalWrite(4, LOW);  delay(delayTime);
  digitalWrite(5, HIGH);  delay(delayTime);
  digitalWrite(5, LOW);  delay(delayTime);
  digitalWrite(6,HIGH);    delay(delayTime);
  digitalWrite(6, LOW);    delay(delayTime);
  digitalWrite(7, HIGH);    delay(delayTime);
  digitalWrite(7, LOW);    delay(delayTime);
  digitalWrite(8, HIGH);  delay(delayTime);
  digitalWrite(8, LOW);  delay(delayTime);
  digitalWrite(9, HIGH);  delay(delayTime);
  digitalWrite(9, LOW);  delay(delayTime);
  digitalWrite(10, HIGH);  delay(delayTime);
  digitalWrite(10, LOW);  delay(delayTime);   
  digitalWrite(11, HIGH);    delay(delayTime);
  digitalWrite(11, LOW);    delay(delayTime);
  digitalWrite(12, HIGH);    delay(delayTime);
  digitalWrite(12, LOW);    delay(delayTime);
    digitalWrite(13, HIGH);    delay(delayTime);
  digitalWrite(13, LOW);    delay(delayTime);

  delayTime = 120;   //0 means Analog Input A0
  digitalWrite(2, HIGH);  delay(delayTime);
  digitalWrite(2, LOW);  delay(delayTime);
  digitalWrite(3, HIGH);  delay(delayTime);
  digitalWrite(3, LOW);  delay(delayTime);
  digitalWrite(4, HIGH);  delay(delayTime);
  digitalWrite(4, LOW);  delay(delayTime);
  digitalWrite(5, HIGH);  delay(delayTime);
  digitalWrite(5, LOW);  delay(delayTime);
  digitalWrite(6,HIGH);    delay(delayTime);
  digitalWrite(6, LOW);    delay(delayTime);
  digitalWrite(7, HIGH);    delay(delayTime);
  digitalWrite(7, LOW);    delay(delayTime);
  digitalWrite(8, HIGH);  delay(delayTime);
  digitalWrite(8, LOW);  delay(delayTime);
  digitalWrite(9, HIGH);  delay(delayTime);
  digitalWrite(9, LOW);  delay(delayTime);
  digitalWrite(10, HIGH);  delay(delayTime);
  digitalWrite(10, LOW);  delay(delayTime);   
  digitalWrite(11, HIGH);    delay(delayTime);
  digitalWrite(11, LOW);    delay(delayTime);
  digitalWrite(12, HIGH);    delay(delayTime);
  digitalWrite(12, LOW);    delay(delayTime);
    digitalWrite(13, HIGH);    delay(delayTime);
  digitalWrite(13, LOW);    delay(delayTime);


//2sided 

  digitalWrite(13, HIGH);    
  digitalWrite(2, HIGH);    delay(delayTime);
  digitalWrite(13, LOW);    
  digitalWrite(2, LOW);    delay(delayTime);
  digitalWrite(12, HIGH);    
  digitalWrite(3, HIGH);    delay(delayTime);
  digitalWrite(12, LOW);    
  digitalWrite(3, LOW);    delay(delayTime);
  digitalWrite(11, HIGH);    
  digitalWrite(4, HIGH);    delay(delayTime);
  digitalWrite(11, LOW);    
  digitalWrite(4, LOW);    delay(delayTime);
  digitalWrite(10, HIGH);    
  digitalWrite(5, HIGH);    delay(delayTime);
  digitalWrite(10, LOW);    
  digitalWrite(5, LOW);    delay(delayTime);
  digitalWrite(9, HIGH);    
  digitalWrite(6, HIGH);    delay(delayTime);
  digitalWrite(9, LOW);    
  digitalWrite(6, LOW);    delay(delayTime);
  digitalWrite(8, HIGH);    
  digitalWrite(7, HIGH);    delay(delayTime);
  digitalWrite(8, LOW);    
  digitalWrite(7, LOW);    delay(delayTime);

  digitalWrite(7, HIGH);    
  digitalWrite(8, HIGH);    delay(delayTime);
  digitalWrite(7, LOW);    
  digitalWrite(8, LOW);    delay(delayTime);
  digitalWrite(6, HIGH);    
  digitalWrite(9, HIGH);    delay(delayTime);
  digitalWrite(6, LOW);    
  digitalWrite(9, LOW);    delay(delayTime);
  digitalWrite(5, HIGH);    
  digitalWrite(10, HIGH);    delay(delayTime);
  digitalWrite(5, LOW);    
  digitalWrite(10, LOW);    delay(delayTime);
  digitalWrite(4, HIGH);    
  digitalWrite(11, HIGH);    delay(delayTime);
  digitalWrite(4, LOW);    
  digitalWrite(11, LOW);    delay(delayTime);
  digitalWrite(3, HIGH);    
  digitalWrite(12, HIGH);    delay(delayTime);
  digitalWrite(3, LOW);    
  digitalWrite(12, LOW);    delay(delayTime);
  digitalWrite(2, HIGH);    
  digitalWrite(13, HIGH);    delay(delayTime);
  digitalWrite(2, LOW);    
  digitalWrite(13, LOW);  delay(delayTime);

  //same as above


 
  digitalWrite(12, HIGH);    
  digitalWrite(3, HIGH);    delay(delayTime);
  digitalWrite(12, LOW);    
  digitalWrite(3, LOW);    delay(delayTime);
  digitalWrite(11, HIGH);    
  digitalWrite(4, HIGH);    delay(delayTime);
  digitalWrite(11, LOW);    
  digitalWrite(4, LOW);    delay(delayTime);
  digitalWrite(10, HIGH);    
  digitalWrite(5, HIGH);    delay(delayTime);
  digitalWrite(10, LOW);    
  digitalWrite(5, LOW);    delay(delayTime);
  digitalWrite(9, HIGH);    
  digitalWrite(6, HIGH);    delay(delayTime);
  digitalWrite(9, LOW);    
  digitalWrite(6, LOW);    delay(delayTime);
  digitalWrite(8, HIGH);    
  digitalWrite(7, HIGH);    delay(delayTime);
  digitalWrite(8, LOW);    
  digitalWrite(7, LOW);    delay(delayTime);

  digitalWrite(7, HIGH);    
  digitalWrite(8, HIGH);    delay(delayTime);
  digitalWrite(7, LOW);    
  digitalWrite(8, LOW);    delay(delayTime);
  digitalWrite(6, HIGH);    
  digitalWrite(9, HIGH);    delay(delayTime);
  digitalWrite(6, LOW);    
  digitalWrite(9, LOW);    delay(delayTime);
  digitalWrite(5, HIGH);    
  digitalWrite(10, HIGH);    delay(delayTime);
  digitalWrite(5, LOW);    
  digitalWrite(10, LOW);    delay(delayTime);
  digitalWrite(4, HIGH);    
  digitalWrite(11, HIGH);    delay(delayTime);
  digitalWrite(4, LOW);    
  digitalWrite(11, LOW);    delay(delayTime);
  digitalWrite(3, HIGH);    
  digitalWrite(12, HIGH);    delay(delayTime);
  digitalWrite(3, LOW);    
  digitalWrite(12, LOW);    delay(delayTime);
  digitalWrite(2, HIGH);    
  digitalWrite(13, HIGH);    delay(delayTime);
 

  
}




RELATED ARTICLES

- Advertisment -

YOU MIGHT LIKE