Making Furniture Interactive

September 4, 2007

paper weight lamp

Filed under: Exercise 0: Make A Lamp — jilore @ 11:41 pm


Materials

3 resistors, 3 LEDs, 3 acrylic paper weights (from IKEA), prototyping board, Arduino

Process

After learning how to program one LED to fade in and out, the first step in creating the lamp was to repeat the same behavior for two more LEDs. After looking over the code and finding out how the arduino tells the LEDs what to do through the appropriate jumpers, I augmented the code to provide for 2 additional LEDs on pins 10 and 11. Next, I changed the code to diversify the behavior between the three LEDs as follows

// Fading LED
// by BARRAGAN <http://people.interaction-ivrea.it/h.barragan&gt;
// adapted by Joe Iloreta
int value = 0; // variable to keep the actual value
int ledBluePin = 9; // light connected to digital pin 9
int ledGreenPin = 10;
int ledRedPin = 11;

void setup()
{
// nothing for setup
}

void loop()
{
//GreenIn
for(value = 0 ; value <= 255; value+=5) // fade in (from min to max)
{
analogWrite(ledGreenPin, value); // sets the value (range from 0 to 255)

delay(35); // waits for 30 milli seconds to see the dimming effect
}
//BlueIn
for(value = 0 ; value <= 255; value+=5) // fade in (from min to max)
{
// sets the value (range from 0 to 255)
analogWrite(ledBluePin, value); // sets the value (range from 0 to 255)

delay(60); // waits for 30 milli seconds to see the dimming effect
}

//GreenOut
for(value = 255; value >=0; value-=5) // fade out (from max to min)
{
analogWrite(ledGreenPin, value); // sets the value (range from 0 to 255)

delay(15);
}

//RedIn
for(value = 0 ; value <= 255; value+=5) // fade in (from min to max)
{
// sets the value (range from 0 to 255)
analogWrite(ledRedPin, value);
delay(35); // waits for 30 milli seconds to see the dimming effect
}

//BlueOut
for(value = 255; value >=0; value-=5) // fade out (from max to min)
{
// sets the value (range from 0 to 255)
analogWrite(ledBluePin, value); // sets the value (range from 0 to 255)

delay(55);
}
//RedOut
for(value = 255; value >=0; value-=5) // fade out (from max to min)
{
// sets the value (range from 0 to 255)
analogWrite(ledRedPin, value);
delay(5);
}
}

Enclosure
After testing multiple materials (paper, acrylic panels, tracing paper) to see how the light is shaped by forms, I ended up using three spare paper weights to house the LEDs. Using a drill, I drilled holes in the bottom of each cube big enough to secure the LED, and deep enough into the cube so that the light and “bubbles” encased would create an interesting play of light and shadow.
drilling
I also drilled in a screw on the bottom of each cube to tilt the paper weights so that the wires connecting the LEDs to the board could protrude out without destabilizing the cubes.

FlickR set here

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: