OMG this is too cool. Today we started to play with a few examples of what the Lilipad can do with LED lights.

First, I downloaded the program and plugged in the Lilipad using a USB cable. I then switch on the Lilipad and tried an example code that will allow the LED light attached to the Lilipad with crocodile cables to BLINK.

Here is the code:

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(10, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(10, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(10, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Final product:

14699650_10157568937170103_1923880194_o 14724133_10157568937225103_664468366_o 14724172_10157568937340103_246296088_o 14786889_10157568937265103_100472238_o 14799871_10157568937175103_690278897_o

I then used an example code of FADE. Here is the code.

int led = 9; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by

// the setup routine runs once when you press reset:
void setup() {
// declare pin 9 to be an output:
pinMode(10, 10);
}

// the loop routine runs over and over again forever:
void loop() {
// set the brightness of pin 9:
analogWrite(10, brightness);

// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;

// reverse the direction of the fading at the ends of the fade:
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount;
}
// wait for 30 milliseconds to see the dimming effect
delay(60);
}

Here’s the final product:

So cool! I’ll be using this dimming technique in my final collection and for my December projects.