« Mystery Well - Collaborative Project (More images to come) | Main | Head Spinin', Crab Walkin' & More »

Club Dance Floor


I was predominantly involved with the creation of the LED dance floor that was at the center of the club floor. The dance floor consisted of 12 squares, each containing a LED. The LEDs were each wired to a resistor that in turn ran into one of the arduino's digital I/Os. The negative leads of the LEDs each ran into a strip that tied them all together so that they could be plugged into the arduino's ground. This helped eliminate clutter. I used the code below to light the LEDs in sequence. The code is a combination of the "knight rider" for loop presented on the arduino website and some simple coding similar to that presented in the example sketch "blink". Reflective tape was used to shape the squares to separate the flashes of light. The light was dispersed with a sheet of thin foam which was covered with a piece of glass.

ClubDanceFloor.pde



int aOne = 1;
int aTwo = 2;
int aThree = 3;
int bOne = 4;
int bTwo = 5;
int bThree = 6;
int cOne = 7;
int cTwo = 8;
int cThree = 9;
int dOne = 10;
int dTwo = 11;
int dThree = 12;
// LED connected to digital pin 13

// The setup() method runs once, when the sketch starts

void setup() {
// initialize the digital pin as an output:
pinMode(aOne, OUTPUT);
pinMode(aTwo, OUTPUT);
pinMode(aThree, OUTPUT);
pinMode(bOne, OUTPUT);
pinMode(bTwo, OUTPUT);
pinMode(bThree, OUTPUT);
pinMode(cOne, OUTPUT);
pinMode(cTwo, OUTPUT);
pinMode(cThree, OUTPUT);
pinMode(dOne, OUTPUT);
pinMode(dTwo, OUTPUT);
pinMode(dThree, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
digitalWrite(aOne, HIGH); // set the LED on
delay(100); // wait for a second
digitalWrite(aOne, LOW); // set the LED off
delay(100); // wait for a second

digitalWrite(aTwo, HIGH);
delay(100);
digitalWrite(aTwo, LOW);
delay(100);
digitalWrite(aThree, HIGH);
delay(100);
digitalWrite(aThree, LOW);
delay(100);
digitalWrite(bOne, HIGH);
delay(100);
digitalWrite(bOne, LOW);
delay(100);
digitalWrite(bTwo, HIGH);
delay(100);
digitalWrite(bTwo, LOW);
delay(100);
digitalWrite(bThree, HIGH);
delay(100);
digitalWrite(bThree, LOW);
delay(100);
digitalWrite(cOne, HIGH);
delay(100);
digitalWrite(cOne, LOW);
delay(100);
digitalWrite(cTwo, HIGH);
delay(100);
digitalWrite(cTwo, LOW);
delay(100);
digitalWrite(cThree, HIGH);
delay(100);
digitalWrite(cThree, LOW);
delay(100);
digitalWrite(dOne, HIGH);
delay(100);
digitalWrite(dOne, LOW);
delay(100);
digitalWrite(dTwo, HIGH);
delay(100);
digitalWrite(dTwo, LOW);
delay(100);
digitalWrite(dThree, HIGH);
delay(100);
digitalWrite(dThree, LOW);
delay(100);
}