Playful Experience Design Through Interactive and Wireless Techniques ------------------------------------//
Design and Technology // MFA // Fall 2008 // Parsons The New School for Design. ------------------------// Instructor: Yury Gitman
"The Love Lamp (ohhh yeah!)" sets the mood for love....everytime!
A pair of unassuming jeans hang from the lamp waiting to set the mood.
Here's how it works: 1. turn on the lamp by flipping the switch on the condom box 2. unzip the pants slowly 3. watch the light turn from white to red 4. listen to the sweet, sweet sounds of Marvin Gaye "Let's Get It On" 5. get it on...
So I got the code and circuitry to all work correctly for my "Let's Get It On" Lamp. I am so excited to get it working on the reals.
Yet, i'm still havin some issues with the pants circuitry. Sometimes the fly signal works, others it doesn't.
*Side note: there pants have enough batteries in them to melt through the crotch. This concerns me a bit and it could probably be wired in a more optimal way, with less batteries, but I need a break from this. FYI: Not for actual wearing!
/////-------------------------------------------------CODE-----------------------------------------------------///// /* * BlinkColorFader -- Example of how to select color & brightness * with two pots * * For more info on how to use pots and analog inputs see: * http://www.arduino.cc/en/Tutorial/AnalogInput * * BlinkM connections to Arduino * PWR - -- gnd -- black -- Gnd * PWR + -- +5V -- red -- 5V * I2C d -- SDA -- green -- Analog In 4 * I2C c -- SCK -- blue -- Analog In 5 * * Note: This sketch sends to the I2C "broadcast" address of 0, * so all BlinkMs on the I2C bus will respond. */
#include "Wire.h" #include "BlinkM_funcs.h"
//address for BlinkM #define blinkm_addr 0x00
// INPUT: Potentiometer should be connected to 5V and GND int potPin = 0; // Potentiometer output connected to analog pin 0 #define potPin 0 // analog in pins from zipper signal to control LED fade color: white to red #define ARRAY_SIZE 5 //this is the array size int potNums[ARRAY_SIZE]; //this reads AND stores 10 numbers from the potentiometer input. int pot_val; //potentiometer value from zipper position on jeans
// OUTPUT: Use digital pins 9-11, the Pulse-width Modulation (PWM) pins // LED's cathodes should be connected to digital GND int pPin = 7; //PLAY, conncected to pin8
// Program variables int currentPlace = 0; //this is the total value int placeHolder = 0; //placehoder for each spot in the array int ave = 0; //average pot input numbers (normalize/smooth the input signal)
//SETUP void setup() { BlinkM_beginWithPower(); BlinkM_stopScript(blinkm_addr); // turn off startup script Serial.begin(9600); // ...set up the serial ouput in 0004 format
for (int i = 0; ARRAY_SIZE < 5; i++) { potNums[i] = 0; //fills all values in the array to 0 } pinMode(pPin, OUTPUT); }
// MAIN void loop() { currentPlace -= potNums[placeHolder]; //subtract the last reading from array potNums[placeHolder] = analogRead(potPin); // read the potentiometer value at the input pin currentPlace += potNums[placeHolder]; //add to the array placeHolder++; //add 1 to the placeHolder each loop
if(placeHolder >= ARRAY_SIZE) { placeHolder = 0; //if the placeHolder goes thru the whole array, } //then loop back to the 1st spot in the array
ave = currentPlace/ARRAY_SIZE; //calc the average //Serial.println(ave); // send it to the computer (as ASCII digits)
pot_val = analogRead(potPin); // read the hue pot //Serial.println(pot_val);
//light should fade from white when zipper is up to red when zipper is down BlinkM_fadeToRGB( blinkm_addr, 255, int(pot_val/3.5), int(pot_val/3.5)); // adjust the green and blue to decrease with pot values
if (ave > 600) // Upper third of potentiometer"s range (600) { digitalWrite(pPin, HIGH); //keep digital pin open if zipper is near top }
else if (ave >= 200 && ave <= 500) // Middle third of potentiometer's range (100 - 150) { digitalWrite(pPin, HIGH); //keep digital pin open if zipper is in middle }
else if (ave < 100) // Lowest third of the potentiometer's range (50 - 100)/turn on music here (< 100) { digitalWrite(pPin, LOW); //put digital pin to GROUND if zipper is at bottom }
TIMELINE: nov. 11: start zipper circuit. nov. 18: zipper circuit done! nov. 25: (no class but...) connect audio chip and superbright LEDs inside shade to zipper control. dec. 2: record audio track "marvin gaye...let's get it on"/ attach pants to shade / any other debugging. dec. 9: write presentation / document product for web (package project....images, video, how to, etc ) dec. 16: present yo!
I had to post this......it cracks me up. Maybe I can use this as a precedent. This fits in with my zipper time, mood music/lighting pants....only a bit more practical, but just slightly.
Here's my LED pumkin man. The led eyes blink with fright when an unsuspecting kid steps on a nearby mat that triggers scary sounds and brings the pumpkin to life! OOOOooooooo! Scary!
So I have some pretty silly ideas, just bare with me.
1: RUSTLING GRASS This is a simulation of natural grasses rustling as someone walks past a vase.
how it works: 3 vases filled with "natural" grasses with IR sensor in the bottom of the vase, detects when the beam is broken by a passer - by and triggers a buzzer motor to rustle the grass for a short period. Each vase is wired separate. The illusion is of something walking thru the grass along side the person.
2: THE UNTANDEM TANDEM BIKE This idea was developed with Erik Burke as a way to determine how close or far two bikes are from eachother.
how it works: Erik and his girlfriend, Taelor, ride their bikes together, yet Erik doesn't know if he is riding too fast or slow. We decided that the UNTANDEM TANDEM is the solution he needs. Bike 1 has an IR reciever and bike 2 has an IR emmitter. Bike 1 will then alert the rider (Erik) if bike 2 (Taelor) is too far behind or too close. Bike 1 rider will then know to slow down or speed up. Bike 1 will emitt either a verbal or visual, light, que to let Erik know how far behind Taelor is from him.
3. Zipper Time Inspired by JooYoun Paek's "Zipper Orchestra" I thought it would be funny to change the zipper to trigger "do it" music and dim the lighting. I know, I know......This is 12 year old humor, but hey....it makes me giggle. I guess that means I'm 12. I can handle that.
how it works: 1 pair of jeans with a metal zipper that when unzipped dims the lighting and plays Barry White songs.
Check out my lil IR sensor with a full-color LED (aka RGB). It didn't have to change my code, only replace my potentiometer with my IR sensor and my 3 LEDs with the 1 full-color LED.
/* * Code for making one potentiometer control 3 LEDs, red, grn and blu, or one tri-color LED * The program cross-fades from red to grn, grn to blu, and blu to red * Debugging code assumes Arduino 0004, as it uses Serial.begin()-style functions * Clay Shirky <[email protected]> */
// INPUT: Potentiometer should be connected to 5V and GND int potPin = 0; // Potentiometer output connected to analog pin 3 int potVal = 0; // Variable to store the input from the potentiometer
// OUTPUT: Use digital pins 9-11, the Pulse-width Modulation (PWM) pins // LED's cathodes should be connected to digital GND int redPin = 9; // Red LED, connected to digital pin 9 int grnPin = 10; // Green LED, connected to digital pin 10 int bluPin = 11; // Blue LED, connected to digital pin 11
// Program variables int redVal = 0; // Variables to store the values to send to the pins int grnVal = 0; int bluVal = 0;
int DEBUG = 1; // Set to 1 to turn on debugging output
void setup() { pinMode(redPin, OUTPUT); // sets the pins as output pinMode(grnPin, OUTPUT); pinMode(bluPin, OUTPUT);
if (DEBUG) { // If we want to see the pin values for debugging... Serial.begin(9600); // ...set up the serial ouput in 0004 format } }
// Main program void loop() { potVal = analogRead(potPin); // read the potentiometer value at the input pin
if (potVal < 341) // Lowest third of the potentiometer's range (0-340) { potVal = (potVal * 3) / 4; // Normalize to 0-255
redVal = 256 - potVal; // Red from full to off grnVal = potVal; // Green from off to full bluVal = 1; // Blue off } else if (potVal < 682) // Middle third of potentiometer's range (341-681) { potVal = ( (potVal-341) * 3) / 4; // Normalize to 0-255
redVal = 1; // Red off grnVal = 256 - potVal; // Green from full to off bluVal = potVal; // Blue from off to full } else // Upper third of potentiometer"s range (682-1023) { potVal = ( (potVal-683) * 3) / 4; // Normalize to 0-255
redVal = potVal; // Red from off to full grnVal = 1; // Green off bluVal = 256 - potVal; // Blue from full to off } analogWrite(redPin, redVal); // Write values to LED pins analogWrite(grnPin, grnVal); analogWrite(bluPin, bluVal);
if (DEBUG) { // If we want to read the output DEBUG += 1; // Increment the DEBUG counter if (DEBUG > 100) // Print every hundred loops { DEBUG = 1; // Reset the counter // Serial output using 0004-style functions Serial.print("R:"); // Indicate that output is red value Serial.print(redVal); // Print red value Serial.print("\t"); // Print a tab Serial.print("G:"); // Repeat for grn and blu... Serial.print(grnVal); Serial.print("\t"); Serial.print("B:"); Serial.println(bluVal); // println, to end with a carriage return } } }
I'm Lynn Maharas and am super excited about this class Making Wireless Toys 5 (MWT5). I think it's pretty awesome....i also enjoy abbreviating things (e.a.t.).
I am a second year grad student here at Parsons Design & Technology and am interested in creating physical objects to display digital aspects.
I have an education in anthropology and geography and am very interested in the physical/natural world. I worked as a professional cartographer prior to graduate school and feel a strong connection to terrain and local. Themes of space/place, and physical topology constantly influence and "ground" my work (pun intended).
I am looking forward to creating some great, physical devices in this class while I explore ways to bridge between the digital and physical. I decided to take this class as a way to explore these ideas while also incorporating elements of play. I look forward to further understanding electronics and learning how and when to apply them to my work.
As far as my favorite childhood toy, it would have to be my teddy bear. He was a gift from my grandmother and stayed by my side for many, many years. Oh! And I was obsessed with finger paints!
Recent Comments