Stage Simulation LED Light Show
by ivy_chengyu in Circuits > Arduino
235 Views, 0 Favorites, 0 Comments
Stage Simulation LED Light Show
This is a machine that can pretend there has a show. Different kinds of colors for the LED can give you different kinds of feeling about the stage.
Using the color of white, blue, green, red and orange can show that the stage was very colorful. Also, it can bring people to have a joyful feeling when that watching the show.
I want to make this product is because of the epidemic problem, we can't really go to watch a stage show. With this opportunity, I would like to make out a nice product that can bring people in a great mood. Thus, they can watch the show and turn on the product that I made, so it will have a nice show time.
Source: https://www.instructables.com/Flowing-LED-Lights-...
Prepare the Material You Need!
LED light -
Orange X1
Blue X2
White X2
Green X1
Short wires X9
Medium wires X9
Breadboard X1
Arduino Leonardo USB line X1
Thick tracing paper x1
Creating the Electric Circuit!
You need to plug all the LED lights in the same horizontal straight line (you don't have to have space between a LED light) Leave space for a later step and plug the short wire that connects to the positive electrode for the short side of the LED line. The long side of the LED line will be using another short wire to connect with the digital on the Arduino Leonardo. At the last plug, the medium wire connects with the GND on Arduino Leonardo and the positive electrode that the short wire connects with earlier.
You can see the example on the top!
Creating the Code
void setup() <p>{ pinMode(2,OUTPUT);</p><p>pinMode(3,OUTPUT);</p><p>pinMode(4,OUTPUT);</p><p>pinMode(5,OUTPUT);</p><p>pinMode(6,OUTPUT);</p><p>pinMode(7,OUTPUT);</p><p>pinMode(8,OUTPUT);</p><p>pinMode(9,OUTPUT); } //"改"加了許多不同顏色的燈泡</p><p>void loop() { int i;</p><p>// 1st pattern repeat 1 times</p><p>for(i=1; i<=10; i++) { digitalWrite(i,HIGH); delay(50); digitalWrite(i,LOW); delay(50); }</p><p>for(i=10; i>=1; i--) { digitalWrite(i,HIGH); delay(50); digitalWrite(i,LOW); delay(50); } delay(1000);</p><p>//2nd pattern repeat 1 times</p><p>for(i=1; i<=10 ; i++) { digitalWrite(i,HIGH);</p><p>delay(50); } //"改" delay 50 原本100</p><p>for(i=1; i<=10 ; i++) { digitalWrite(i,LOW);</p><p>delay(50); }</p><p>for(i=10; i>=1 ; i--) { digitalWrite(i,HIGH);</p><p>delay(50); }</p><p>for(i=10; i>=1 ; i--) { digitalWrite(i,LOW);</p><p>delay(50); } delay(1000);</p><p>//3rd pattern repeat 1 times //"改"我加了重複</p><p>for(i=1; i<=10 ; i++) { digitalWrite(i,HIGH); delay(50); } for(i=11; i>=1 ; i--) { digitalWrite(i,LOW); delay(50); }</p><p>for(i=10; i>=1 ; i--) { digitalWrite(i,HIGH); delay(50); } for(i=1; i<=10 ; i++) { digitalWrite(i,LOW); delay(50); } delay(1000);</p><p>//4th pattern repeat 1 times</p><p>for(i=1; i<=5 ; i++) { digitalWrite(i,HIGH); digitalWrite(11-i,HIGH); delay(100); } for(i=1; i<=5 ; i++) { digitalWrite(i,LOW); digitalWrite(11-i,LOW); delay(100); } delay(100); for(i=1; i<=5 ; i++) { digitalWrite(i,HIGH); digitalWrite(11-i,HIGH); delay(100); } for(i=5; i>=1 ; i--) { digitalWrite(i,LOW); digitalWrite(11-i,LOW); delay(100); } delay(1000);</p><p>//5th pattern rpeat 1 time</p><p>for(i=1 ; i<=3 ; i++) { digitalWrite(i,HIGH); digitalWrite(i+3,HIGH); digitalWrite(i+6,HIGH); delay(500/i); } delay(500);</p><p>for(i=1 ; i<=3 ; i++) { digitalWrite(i,LOW); digitalWrite(i+3,LOW); digitalWrite(i+6,LOW); delay(500/i); }</p><p>delay(1000); //"改" delay1000毫秒</p>