Muhammad_Munir
Published © GPL3+

Running LEDs Using Arduino

How to make Running LEDs Using Arduino

BeginnerFull instructions provided58
Running LEDs Using Arduino

Things used in this project

Story

Read more

Code

Untitled file

Arduino
#define LED0 4

#define LED1 5

#define LED2 6

#define LED3 7

#define LED4 8

void setup() 
{
    pinMode(LED0, OUTPUT);
    pinMode(LED1, OUTPUT); 
    pinMode(LED2, OUTPUT);
    pinMode(LED3, OUTPUT); 
    pinMode(LED4, OUTPUT);
      
}
void loop()
{
            
            digitalWrite(LED0,HIGH);
            delay(200);
            digitalWrite(LED0,LOW);
            digitalWrite(LED1,HIGH);
            delay(200);
            digitalWrite(LED1,LOW);
            digitalWrite(LED2,HIGH);
            delay(200);
            digitalWrite(LED2,LOW);
            digitalWrite(LED3,HIGH);
            delay(200);
            digitalWrite(LED3,LOW);
            digitalWrite(LED4,HIGH);
            delay(200);
            digitalWrite(LED4,LOW);
            delay(200);

            digitalWrite(LED4,HIGH);
            delay(200);
            digitalWrite(LED4,LOW);
            digitalWrite(LED3,HIGH);
            delay(200);
            digitalWrite(LED3,LOW);
            digitalWrite(LED2,HIGH);
            delay(200);
            digitalWrite(LED2,LOW);
            digitalWrite(LED1,HIGH);
            delay(200);
            digitalWrite(LED1,LOW);
            digitalWrite(LED0,HIGH);
            delay(200);
            digitalWrite(LED0,LOW);
            delay(200);
}

Credits

Muhammad_Munir

Muhammad_Munir

1 project • 2 followers

Comments