EER99
Published © GPL3+

Scrolling LEDS (Chasing LEDS) using Arduino Uno

In this project I will guide you on how to control Scrolling LEDS

BeginnerFull instructions provided8,861
Scrolling LEDS (Chasing LEDS) using Arduino Uno

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
LED (generic)
LED (generic)
×1
Resistor 220 ohm
Resistor 220 ohm
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Plier, Needle Nose
Plier, Needle Nose

Story

Read more

Schematics

Diagram

Code

Code for this project

Arduino
//YouTube channel: https://www.youtube.com/channel/UC5trxvQIeT6XOJKarnHC5Eg?view_as=subscriber//
//Instagram: https://www.instagram.com/royba71/ //
//Project Roy Ben Avraham, Last modification 1/4/2020 //


int pinsCount=10;                        // declaring the integer variable pinsCount
int pins[] = {2,3,4,5,6,7,8,9,10,11};          // declaring the array pins[]
 
void setup() {                
  for (int i=0; i<pinsCount; i=i+1){    // counting the variable i from 0 to 9
    pinMode(pins[i], OUTPUT);            // initialising the pin at index i of the array of pins as OUTPUT
  }
}
 
void loop() {
  
  for (int i=pinsCount-1; i>0; i=i-1){   // chasing left (except the outer leds)
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(35);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
   for (int i=0; i<pinsCount; i=i+1){    // chasing right
    digitalWrite(pins[i], HIGH);         // switching the LED at index i on
    delay(35);                          // stopping the program for 100 milliseconds
    digitalWrite(pins[i], LOW);          // switching the LED at index i off
  }
}

//Good luck and enjoy, Roy.

Credits

EER99

EER99

12 projects • 23 followers
B.Sc. Electrical & Electronics Engineer

Comments