lightshow(peace) rach&eric

Rachael Sophiea & Eric Haase

Our project was a rather inexpensive and simple way to make a cool electronic project. Our project consisted of a line of six (6) L.E.D's that are powered through a bread board by a nine (9) volt battery. The lights on the bread board are blinking in such a pattern that when the entire bread board is spun, the L.E.D's display an image. Our bread board is being spun by a DC motor by another nine (9) volt battery. The DC motor powered by the nine (9) volt battery is strong enough to spin the entire bread board and display whatever you want.

int pins[] = {2,3,4,5,6,7}; // an array of pin numbers

int col_len = 6; // column lenght

// customizable parameters

int timer1 = 3; // time between columns

int timer2 = 15; // time between frames

int timer3 = 0; // time between drawings

int frame_len = 4; // frame length

int frame_num = 7; // number of frames

// data corresponding to the image to be displayed

int data[] = {1,1,1,1,1,1,1,0,1,0,0,0,1,0,1,0,0,0,1,1,1,0,0,0, 1,1,1,1,1,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,0,0,1, 1,1,1,1,1,1,1,0,0,1,0,0,1,0,0,1,0,0,1,1,1,1,1,1, 1,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1, 1,1,1,1,1,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,0,0,1, 0,0,1,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,0,1, 1,0,0,1,0,1,0,1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0};

void setup()

{

int i;

for (i = 0; i < col_len; i++)

pinMode(pins[i], OUTPUT); // set each pin as an output

}

void loop()

{

int a,b,c;

// go through all data for all columns in each frame.

for (a = 0; a < frame_num; a++)

{

for (b = 0; b < frame_len; b++)

{

for (c = 0; c < col_len; c++)

{

if (data[a*frame_len*col_len + b*col_len + c] == 0) {digitalWrite(pins[c], LOW);}

else {digitalWrite(pins[c], HIGH);}

}

delay(timer1);

}

for (c = 0; c < col_len; c++)

{digitalWrite(pins[c], LOW);}

delay(timer2);

}

delay(timer3);

}