« Collection Project - Revised Template | Main | Object 4: Network »

Object 3: Connection

This week's assignment was to create an object that engaged with the concept of connection, whether by creating a new type of connector, or by representing the concept in a novel way. Despina provided us with some conductive thread to use, so I was eager to experiment with this new material, and to use this project as a physical computing refresher, since it has been a long time since I've wired a circuit. I decided to experiment with whether I could use the conductive thread on velcro as the connector. Also, in thinking about connections in terms of people, it occurred to me that connections often grow in physical spaces that are disconnected from the surrounding world, thus promoting a sense of intimacy. I decided to make a set of curtains embedded with LEDs, and wired so that the LEDs would light when the curtains were closed--thereby creating an ambient interior space.

It turns out that I had forgotten pretty much everything I knew about physical computing, and misremebered the rest... Since I never really mastered the skill of drawing a proper schematic, I did what I could to sketch out the design. As you may (or may not) be able to tell from the grapic below, I was under the mistaken impression that I could get away with using just one power and ground line on each side of the curtain for both the switch and the LEDs.

I sewed in the conductive thread using the bobbin on my sewing machine, which worked very well. I then hand sewed the velcro tabs onto each side and wired in the LEDs on each side. I programmed the Arduino (code below) and attached the curtains to the board, but of course since my setup was faulty, the circuit didn't work. I went back and sewed in another line of conductive thread on each curtain for the switch, which did the trick, and things then worked as expected with the LEDs lighting when the curtain was closed and attached with the velcro, and turning off when the switch was unhooked.

Arduino Code

// declare variables for combination lock:
int switch1Pin = 2;      //  digital input pin for switch
int switch1State = 0;    // set the state of the switch to open
int LedPin1 = 3;     //  digital output pin for 1st LED
int LedPin2 = 4;     //  digital output pin for 2nd LED

void setup() {
  pinMode(switch1Pin, INPUT);       // set the first switch pin to be an input
  pinMode(LedPin1, OUTPUT);      // set 1st LED pin to be an output
  pinMode(LedPin2, OUTPUT);      // set 2nd LED pin to be an output
}

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

  if (switch1State == 1)  {
    digitalWrite(LedPin1, HIGH);     // turn on this LED
    digitalWrite(LedPin2, HIGH);     // turn on this LED
  } 
  else {
    // if the combo isn't correct yet:
    digitalWrite(LedPin1, LOW);     // turn off this LED
    digitalWrite(LedPin2, LOW);     // turn off this LED
  }
}

TrackBack

TrackBack URL for this entry:
http://itp.nyu.edu/~km63/cgi-bin/mt/mt-tb.cgi/35

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)