How to Make an Arduino Programming LED Bulb Pattern




How to make an LED bulb pattern

This is similar to the Night Rider LED circuit ...

What does this require ...
1) An Arduino Board
2) A Bread Board
3) 5 LEDs. (You can make as many LEDs as you like)
4) 5 220 ohms Resistor (you need a resistor for LED bulbs)
5) Jumper Wire


The bottom image is now ready to be set up and ready for work ...

Set the inventory down to the minimum of 2,3,4,5,6 pin on the Arduino board. upload ...

int LED1 = 2;
int LED2 = 3;
int LED3 = 4;
int LED4 = 5;
int LED5 = 6;
void setup () {
pinMode (LED1, OUTPUT);
pinMode (LED2, OUTPUT);
pinMode (LED3, OUTPUT);
pinMode (LED4, OUTPUT);
pinMode (LED5, OUTPUT);
}
void loop () {
digitalWrite (LED1, HIGH);
delay (50);
digitalWrite (LED1, LOW);
delay (50);
digitalWrite (LED2, HIGH);
delay (50);
digitalWrite (LED2, LOW);
delay (50);
digitalWrite (LED3, HIGH);
delay (50);
digitalWrite (LED3, LOW);
delay (50);
digitalWrite (LED4, HIGH);
delay (50);
digitalWrite (LED4, LOW);
delay (50);
digitalWrite (LED5, HIGH);
delay (50);
digitalWrite (LED5, LOW);
delay (50);
digitalWrite (LED4, HIGH);
delay (50);
digitalWrite (LED4, LOW);
delay (50);
digitalWrite (LED3, HIGH);
delay (50);
digitalWrite (LED3, LOW);
delay (50);
digitalWrite (LED2, HIGH);
delay (50);
digitalWrite (LED2, LOW);
delay (50);
}

The next section will show you how to write this code in just a few lines ...

If there is an unknown point in the code, ask ... I'll explain the code

You can find out more about these and how to buy and use these devices on my youtube channel.- youtube.com/SLBuilds


Post a Comment

0 Comments