Chaser Lights -quinn

by Quinnstructable in Circuits > LEDs

360 Views, 2 Favorites, 0 Comments

Chaser Lights -quinn

tmp_image_0.jpeg

This will be making an application where strings of adjacent light bulbs cycle on and off frequently to give the illusion of lights moving along the string.

Set Up Arduino Board

64-02.jpg
48912-arduinouno_r3_front.jpg
45040-dscn0624-400x300.jpg
resistors.jpg
led-rgb-lights.jpg

materials needed:

Arduino board

LED x6

Resistors x6

Breadboard

Connecting wires x9

Add Pieces Into Breadboard

Bildschirmfoto 2013-12-03 um 10.03.29.png

connect wires from Arduino to breadboard as done in the photo with resistors and LED lights in the correct place.

Coding

Screen Shot 2017-04-19 at 8.21.38 AM.png

In your Arduino app create a new project and add in this coding:

int pinsTotal=8;
int pins[] = {2,3,4,6}; int pins[] = {9,8,7,5}; // making a new line makes the computer see it as a new, different subject so it goes at the same time // arrangement/pattern of the direction the lights will go in

void setup() { for (int i=0; i

}

void loop() { for (int i=0; i0; i=i-1){ digitalWrite(pins[i], HIGH); delay(100); digitalWrite(pins[i], LOW); } }


------

Then hit the upload button to connect the coding to the hardware and the lights should work