Arduino LilyPad led dress to wear at a wedding in Italy

Yesterday and today I made a Arduino LilyPad led dress to wear at a wedding in Italy
I bought the black dress in a shop in Trondheim a couple of years ago.

the most difficult part for me is to sew. and to decide not to have all the funny things that I could have, like buzzer, vibe, sensor, but here the idea is to go to a party, be elegant and a bit funny but not be a clown nor try to take to much attention. so I am satisfied. and I am looking forward to vacation and party.

video video2

pictures

code

int ledPins[] = {
5, 6, 7, 8, 9, 10, 11 };       // an array of pin numbers to which LEDs are attached
int pinCount = 7;           // the number of pins (i.e. the length of the array)

int brightness [] = {
0, 0, 0, 0, 0, 0, 0 };

int fadeAmount [] = {
1, 2, 3, 4, 5, 6, 7 };

void setup()  {

int thisPin;
// the array elements are numbered from 0 to (pinCount – 1).
// use a for loop to initialize each pin as an output:
for (int thisPin = 0; thisPin < pinCount; thisPin++)  {
pinMode(ledPins[thisPin], OUTPUT);
}
}

void loop()  {
// set the brightness of all pins
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
// turn the pin on:
analogWrite(ledPins[thisPin], brightness[thisPin]);
}

// change brightness
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
// turn the pin on:
brightness[thisPin] = brightness[thisPin] + fadeAmount[thisPin];
}

// reverse the direction of the fading at the ends of the fade:
for (int thisPin = 0; thisPin < pinCount; thisPin++) {
if (brightness [thisPin]<= 0 || brightness [thisPin] >= 255) {
fadeAmount[thisPin] = -fadeAmount[thisPin] ;
}}

// wait for 30 milliseconds to see the dimming effect
delay(30);
}

One thought on “Arduino LilyPad led dress to wear at a wedding in Italy”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s