Arduino Light Show
if you are just now getting into Arduino here is a cool and easy project for you
What You Need
- An arduino
- a DC power supply
- a bread board
- 4 led's
- 9 jumper cables
- a DC power supply
- a bread board
- 4 led's
- 9 jumper cables
Step 1
Plug 4 jumper cables in the input / output ports
plug them into pins 8-11
plug them into pins 8-11
Step 2
plug 4 leds into your bread board make sure that you have them all the same way
ex. all the positive leads on the right and all the negative leads on the left
tip- the shorter lead on the led is the negative lead
ex. all the positive leads on the right and all the negative leads on the left
tip- the shorter lead on the led is the negative lead
Step 3
plug one jumper cable into ground and plug the other end of the cable into the negative rail on your breadboard
plug all the input / output pins 8-11 into the same rail as the positive leads of your leds
plug all the input / output pins 8-11 into the same rail as the positive leads of your leds
Step 4
take 4 jumper cables and plug one end into the negative rail on your bread board and the other end into the negative lead on your leds
Step 5
you will need to copy the sketch below and paste it into your arduino software and upload it to your arduino
void setup(){
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop(){
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8, LOW);
delay(3);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(3);
digitalWrite(10, HIGH);
delay(100);
digitalWrite(10, LOW);
delay(3);
digitalWrite(11, HIGH);
delay(100);
digitalWrite(11, LOW);
delay(3);
digitalWrite(10, HIGH);
delay(100);
digitalWrite(10, LOW);
delay(3);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(3);
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8, LOW);
delay(3);
}
void setup(){
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop(){
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8, LOW);
delay(3);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(3);
digitalWrite(10, HIGH);
delay(100);
digitalWrite(10, LOW);
delay(3);
digitalWrite(11, HIGH);
delay(100);
digitalWrite(11, LOW);
delay(3);
digitalWrite(10, HIGH);
delay(100);
digitalWrite(10, LOW);
delay(3);
digitalWrite(9, HIGH);
delay(100);
digitalWrite(9, LOW);
delay(3);
digitalWrite(8, HIGH);
delay(100);
digitalWrite(8, LOW);
delay(3);
}
Finished
now you have a cool little light show
if you liked this instructable please follow me and check out some of my other projects
please vote
if you liked this instructable please follow me and check out some of my other projects
please vote