Main | October 2006 »

September 28, 2006

Love Meter

Assignment: Make a luv-o-meter with analog inputs. A luv-o-meter is a device that measures a person's potential to be a lover, and displays it on a graph of lights. Your luv-o-meter can measure any analog physical quantity that you want, providing you have a sensor for it. Make sure the display is clear, so the participant knows what it means, and make sure it is responsive.

For this assignment, I attached a flex sensor to a wire, supporting a target for the participant to aim at with a soft ball or toy bow and arrow. The more accurate the hit, the more the flex sensor bends, and the higher love rating for the participant (white=mild, yellow=medium, red=spicy).

Problems I encountered while working on this assignment related primarily to the delicacy of the flex sensor. I accidentally tore one of the pins off the sensor when installing it in the box, and had to duct tape it back together.

Breadboard & Arduino Setup

Arduino Code

int flexPin = 0;    // Analog input pin that the flex sensor is attached to
int flexValue = 0;   // value read from the pot
int lowLED = 3;    // low LED 
int mediumLED = 4; // medium LED
int highLED = 5; // high LED
boolean loveInput = false; // test whether someone has tried

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600); 
  
  pinMode(lowLED, OUTPUT);      // set the yellow LED low pin to be an output
  pinMode(mediumLED, OUTPUT);      // set the green LED medium pin to be an output
  pinMode(highLED, OUTPUT);      // set the red LED high pin to be an output
}

void loop() {
  Serial.println(flexValue);      // print the flex value back to the debugger pane
  // read the flex input:
  flexValue = analogRead(flexPin); // read the flex value
  if (flexValue <= 45) {
    digitalWrite(lowLED, HIGH);    // turn the low LED on
    digitalWrite(mediumLED, HIGH);    // turn the medium LED on
    digitalWrite(highLED, HIGH);    // turn the high LED on
    loveInput = true;
  }
  else if (flexValue <= 60) {
    digitalWrite(lowLED, HIGH);    // turn the low LED on
    digitalWrite(mediumLED, HIGH);    // turn the medium LED on
    digitalWrite(highLED, LOW);    // turn the high LED off
    loveInput = true;
  }
  else if (flexValue <= 72) {
    digitalWrite(lowLED, HIGH);    // turn the low LED on
    digitalWrite(mediumLED, LOW);    // turn the medium LED off
    digitalWrite(highLED, LOW);    // turn the high LED off
    loveInput = true;
  }
 else {
   digitalWrite(lowLED, LOW);    // turn the low LED off
   digitalWrite(mediumLED, LOW);    // turn the medium LED off
   digitalWrite(highLED, LOW);    // turn the high LED off
 }
 if (loveInput == true){
   delay(2000);
 }
}

September 27, 2006

Counting Daily Uses II

Assignment: From the previous observation assignment, pick the interaction you found the most interesting and observe and describe it in depth. As much as possible, try not to describe the person's intention, just their action. Imagine you were entirely unaware of the social context of the interaction, as if you were an extraterrestrial alien, seeing this for the first time.

I observed people holding or pushing carts full of products approach and line up before a row of machines next to a conveyor belt. Some of the machines had buttons and a drawer that were being operated by a single, standing person. Other machines had no person attending them, a different arrangement of buttons, and no drawer. I noticed that people more often choose those machines that were attended by a person, even though the lines at those machines were often longer.

When a person did choose a machine with no person near it, they usually stood still and stared at the machine for a few minutes, then pushed a button on a monitor attached to the machine. They then continued to stand in front of the machine, picked up one of the items they had brought with them, turned it over in their hands a few times, looked at it, then rubbed the item from right to left on the conveyor belt in front of the machine. The machine then usually made a beeping noise, and the person repeated the process with a new item, placing the first item a plastic bag to the right of the machine.

Sometimes, however, the machine made no beeping noise when the item was rubbed in front of it. When this happened, the person usually rubbed the item back and forth several times with increasing force, examined the item again, sometimes bending or twisting it, rubbed it some more, then looked around the room with frustration, sometime speaking aloud to nearby machine operators. After a few minutes, a person in a uniform usually came over, took the item, and repeated the process of rubbing the item on the conveyor belt. Sometimes the machine beeped when the person did this, but more often, the second person punched buttons on the machine's monitor, which produced the desired beeping noise.

After the person had successfully made the machine beep with each item, and had placed all the items in one or more plastic bags, they removed a thin plastic card from their clothing or a small bag they were carrying, then slid this card through a box attached to the machine and touched the screen with their finger several times. Sometimes, they then picked up a writing implement and wrote something on the box instead.

At one point, when the room was quite full of people carrying items, a person in a uniform approached one of the person-less machines and called other people carrying items over to it. The uniformed person then rubbed the person's items on the belt for them, which seemed a little awkward, since both people were standing on the same side of the belt, unlike the other person-operated machines. The uniformed person did seem to be more successful at making the machine beep, however.

Overall, the people who used the machine with no person in front of it completed the beeping process faster than those who waited in the longer lines, but most people did not seem to want to use them, though they did seem to enjoy watching other people who used them. Also, when people did use them, they seemed to get frustrated very quickly when the beeps did not happen, even when they ultimately finished the process faster. The people who left looking the most satisfied were those who were carrying only a few items, and had no trouble making the machine beep.

September 23, 2006

Dynamic Processing Character

Assignment: Draw a character in Processing and make it “dynamic.” For example, develop a set of rules for moving it around the screen, have it grow and shrink, change colors, etc. Can you make it respond to mouse interactivitiy?

To view this content, you need to install Java from java.com

Source code: bear4

Built with Processing

Move your mouse to make the bear dance; click mouse to change the background color, or hold the mouse button down while dancing for rockin disco effect. If the applet is acting quirky here, you can see a stripped-down version at http://itp.nyu.edu/~km63/icm/week3/

Update

I was able to get the Arduino to talk to Processing, to create a physical interface to this applet.

Combination Lock

Assignment: Come up with your own physical interface for a combination lock, using digital input and output.

I chose to build my own switches, using pushpins and tinfoil on the bottom of wooden blocks to complete the circuit when the block was oriented correctly. The solution requires the colored arrows on the blocks to correctly align with the complementary color on the console.

There is only one correct solution, effected by the alignment of the pins on the blocks, and the placement of the wires in the console. Until the proper combination is achieved, the red LED lights steadily. Once the puzzle is solved, a blue LED blinks to signal success. I added fake terminals to the console so that people couldn't solve the puzzle by simply visually matching the components.

Problems I encountered with this project were that the interface was not particularly intuitive to people asked to solve it, and that the completion of the circuit was somewhat unreliable. I wrapped the wire terminals with tinfoil to increase the likelihood of contact, but there was too much give in the console recepticles to ensure proper placement.

Arduino Code

// declare variables for combination lock:
int switch1Pin = 2;      //  digital input pin for first switch
int switch2Pin = 3;      //  digital input pin for second switch
int switch3Pin = 4;      //  digital input pin for third switch
int greenLedPin = 5;     //  digital output pin for green "win" LED
int redLedPin = 6;     //  digital output pin for red "not yet" LED
int switch1State = 0;    // set the state of the first switch to open
int switch2State = 0;    // set the state of the second switch to open
int switch3State = 0;    // set the state of the third switch to open

void setup() {
  pinMode(switch1Pin, INPUT);       // set the first switch pin to be an input
  pinMode(switch2Pin, INPUT);       // set the second switch pin to be an input
  pinMode(switch3Pin, INPUT);       // set the third switch pin to be an input
  pinMode(greenLedPin, OUTPUT);      // set the green LED "win" pin to be an output
  pinMode(redLedPin, OUTPUT);      // set the red LED "not yet" pin to be an output
}

void loop() {
  // read the switch input:
  switch1State = digitalRead(switch1Pin);
  switch2State = digitalRead(switch2Pin);
  switch3State = digitalRead(switch3Pin);

  if (switch1State == 1 && switch2State == 1 && switch3State == 1)  {
    digitalWrite(redLedPin, LOW);     // turn off the red LED
    digitalWrite(greenLedPin, HIGH);    // turn on the green "win" LED
    delay(300);
    digitalWrite(greenLedPin, LOW);    // turn on the green "win" LED
    delay(300);
  } 
  else {
    // if the combo isn't correct yet:
    digitalWrite(redLedPin, HIGH);     // turn on the red LED - might need to do this after each if?
  }
}

September 18, 2006

Counting Daily Uses

Assignment: Pick a day and take note of every time you see a person using a digital device. This could be anything from buying and using a Metrocard on the subway to playing video games in an arcade to making cell phone calls to using an ATM to swiping an ID at the gym. With each action you note, take note also of the location, the time taken for the action, and the number of people involved in the transaction.

The most interesting thing for me about this pComp assignment--counting the uses of digital devices we witness in one day--was that from a purely observational point of view, almost all of the uses I witnessed were completely solitary activities...though so many of the devices are intended to facilitate communication.

As a culture, we've become very acclimated to connecting ourselves digitally while largely unplugging ourselves from our physical surroundings. I did notice, however, that the average younger user tended to seem more engaged in their surroundings (e.g., making eye contact, moving fluidly through crowds, talking to friends while also on their phone, etc.) than did the older users, who often stood still or paced, looking down or into space while talking on their cell or adjusting their iPod. Perhaps the native users are more accustomed to bridging the divide? Or perhaps some of the older users are simply more likely to use the devices as a way to intentionally disengage?

// on my way to the train, Williamsburg //
10:20am: Man using controller on keychain to turn off his car alarm. 5 seconds.
10:22am: Woman talking on cell phone. 20 seconds (observed in passing).
10:22am: Different woman talking on cell phone. 20 seconds (passing).
10:24am: Man on bike listening to iPod. 3 seconds (passing).
10:25am: Teenager talking on cell phone. 20 seconds (passing).
10:25am: Teenager changing iPod setting. 20 seconds (passing).
10:30am: Woman jogging with iPod. 10 seconds (passing)
10:31am: Woman checking walk/don't walk signal to cross street. 1 second.
10:32am: Woman using MetroCard vending machine. 30 seconds.
10:32am: Woman using MetroCard machine, man observing and pointing to buttons. 20 seconds.
10:32am: Teen using MetroCard card reader. 2 seconds.
10:33am: Man using MetroCard card reader. 2 seconds.
10:33am: Different man using MetroCard card reader. 3 seconds.
10:33am: Woman using MetroCard card reader. 2 seconds.
10:35am: Woman listening to iPod. 5 minutes.
10:35am: Different woman listening to iPod. 5 minutes.
10:35am: Man listening to iPod. 15 minutes.
10:36am: Woman playing video game on cell phone. 5 minutes.

// on L train //
10:40am: Man listening to/adjusting mp3 player. 7 minutes.
10:40am: Woman listening to iPod. 7 minutes.
10:40am: Different woman listening to iPod. 7 minutes.
10:40am: Woman checking digital map of train stops. 20 seconds.
10:40am: Teen listening to mp3 player. 7 minutes.
10:40am: Man listening to iPod. 7 minutes.
10:41am: Man checking digital watch. 10 seconds.
10:44am: Woman using PDA. 3 minutes.
10:45am: Man watching video on iPod. 3 minutes.
10:45am: Train conductor checking door sensors. 20 seconds.

// Manhattan, walking down Lafayette to work //
10:47am: Taxi driver printing out receipt from meter. 10 seconds.
10:47am: Man listening to iPod. 20 seconds (passing).
10:47am: Different man listening to iPod. 20 seconds (passing).
10:47am: Woman talking on cell phone. 20 seconds (passing).
10:47am: Man text messaging on cell phone. 20 seconds (passing).
10:49am: Teen talking on cell phone. 30 seconds (passing).
10:50am: Man using walkie-talkie. 10 seconds (passing).
10:51am: Man using cash register (3x). About 10 seconds each.
10:51am: Man using digital hearing aid. Constantly, I imagine...
10:52am: Man talking on cell phone. 10 seconds (passing).
10:53am: Taxi driver printing out receipt from meter. 10 seconds.
10:54am: 2 Police cars and 1 fire truck w/ sirens and lights. 15 seconds (passing). (Kinda counts, right?)

// at work //
11:00am: Office-mate using computer and iPod. 3 hours.
2:15pm: Man typing text message on cell. 3 minutes.
2:15pm: Man talking on cell phone. 2 minutes.
2:16pm: Woman talking on cell phone. 20 seconds (passing).
2:17pm: Woman listening to mp3 player. 20 seconds (passing).
2:18pm: Kid in stroller playing with motion-sensing light-up toy. 10 seconds (passing).
2:20pm: Man using cash register (5x). About 10 seconds each.
2:22pm: Man listening to iPod. 10 minutes.
2:40pm: Office-mate using computer and iPod. 2 hours.
4:30pm: Woman using PDA. 4 minutes.
4:32pm: Woman using cell phone. 2 minutes.
4:33pm: Teen using cell phone. 1 minute.
4:34pm: Different Teen using cell phone. 1 minute.
4:35pm: Man using PDA. 2 minutes.
5:30pm: Office-mate using computer and iPod. 1.5 hours.
6:15pm: Woman feeding dollar into snack vending machine. 10 seconds.
6:15pm: Man using digital coffee dispenser to make crappy cappuchino. 30 seconds.

// walking from work, errands, train platform //
7:00pm: Man using cell phone. 20 seconds (passing).
7:01pm: Man using iPod. 10 seconds (passing).
7:01pm: Different man using iPod. 10 seconds (passing).
7:01pm: Woman using iPod. 10 seconds (passing).
7:15pm: Woman using self-service scanner in KMart. I minute.
7:15pm: Woman using scanner & register in Kmart. 30 seconds.
7:16pm: Man using self-service scanner in KMart. 2 minutes.
7:16pm: Woman using scanner & register in Kmart. 2 minutes.
7:17pm: Woman using cell phone. 20 seconds (passing).
7:19pm: Different woman using cell phone. 10 seconds (passing).
7:20pm: Different woman using cell phone. 15 seconds (passing).
7:20pm: Woman taking picture of friends w/ digital camera. 10 seconds.
7:21pm: Woman using PDA. 10 seconds (passing).
7:39pm: Dozens of people using scanners/registers at Whole Foods. About a minute each.
7:41pm: Woman using iPod. 10 seconds (passing).
7:43pm: Woman using cell phone. 20 seconds.
7:43pm: Teen using cell phone. 10 seconds (passing).
7:44pm: Man using MetroCard vending machine. 20 second (passing).
7:45pm: Man swiping MetroCard for himself and two women. 30 seconds.
7:45pm: Different man swiping MetroCard. 1 second.
7:45pm: Different man swiping MetroCard. 1 second.
7:48pm: Man listening to mp3 player. 3 minutes.
7:50pm: Woman listening to iPod. 2 minutes.

// on L train //
7:52pm: Man and woman watching video on iPod. 10 minutes.
7:52pm: Woman listening to iPod. 10 minutes.
7:53pm: Different woman listening to iPod. 9 minutes.
7:52pm: Man listening to iPod. 10 minutes.
7:53pm: Man looking at digital display with clock/next stop information. 20 seconds.
7:54pm: Woman playing with iPod. 2 minutes.

// walking home //
8:00pm: Woman talking on cell phone. 20 seconds (passing).
8:02pm: Man using walkie-talkie. 20 seconds (passing).
8:05pm: Teen talking on cell phone. 10 seconds (passing).
8:08pm: Man talking on cell phone. 10 seconds (passing).
8:12pm: Teen talking on cell phone. 1 minute.

// home //
8:15pm: Matt using espresso maker. 3 minutes.
8:25pm: Matt talking on cell phone. 15 minutes.
9:00pm: Matt using computer. 45 minutes.
10:00pm: Matt and I watching movie on DVD player. 1.5 hours.
11:30pm: Matt playing music via iPod doc/stereo. 1 minute.
11:40pm: Matt talking on cell phone. 3 minutes.
1:30am: Matt setting alarm clock. 30 seconds.