DuelingDresses_SociableObjects_Final

For our Sociable Objects class (Summer 2008-Professor Rob Faludi), Seungran Woo and I decided to create two interactive garments.  Playing off of the idea that two women can never show up in a place wearing the same outfit, these outfits will detect when there is another identical garment nearby, “warn”/notify the user that this is happening, and then proceed to change appearance (length, print and/or shape) so that both users will then be wearing different dresses.We are using XBee radios and Lilypad Arduinos in each dress.  The XBee radios are in charge of detecting RSSI values (signal strength) and then the Lilypad proceeds to turn on the buzzer for a limited amount of time (6-10 seconds).  During this time, the user can opt to press a switch to override any impending changes.  If the override switch is not pressed, then the dresses will each change to a different state so that the users will be unique in appearance.  We are still working out the details of this latter process.  After an additional presentation round on Wednesday, July 3rd, we received more, helpful feedback and are reconsidering how the actual change process will work and on what cues these changes will occur.  

Below is our Power Point presentation as well as a link to one of the mockup tests for print change.

DuelingDresses_PowerPoint

DuelingDresses_PrintTest1

RPS_Arduino Code

Here is Steven’s Arduino code for RPS 

#define txLED 3             // LED to indicate outgoing data

#define rxLED 4             // LED to indicate incoming data

#define rockRxLED 5

#define paperRxLED 6

#define scissorsRxLED 7

#define rockInPin 8

#define paperInPin 9

#define scissorsInPin 10

#define winlossLEDPin 13

#define restartPin 12
#define inputReceived 2

#define txrxDelay 100

 

int scoreCount = 0; // keep track of the score, nothing happens in case of tie

boolean opponentReady;      

// true if input has been received from the opponent, otherwise false

boolean selfReady;  // true if input has been received from the switches, //otherwise false

int opponentChoice;        // input received from opponent

int selfChoice;            // input received from switches                           

// we need the booleans AND the chars for this (as opposed to just checking to //make sure the chars are valid values             

// in place of the booleans) because we only want to store the first valid input

 

 

void setup() {

  // configure serial communications:

Serial.begin(9600); 

// configure output pins:

pinMode(txLED, OUTPUT);

pinMode(rxLED, OUTPUT);

pinMode(rockRxLED, OUTPUT);

pinMode(paperRxLED, OUTPUT);

pinMode(scissorsRxLED, OUTPUT);

pinMode(rockInPin, INPUT);

pinMode(paperInPin, INPUT);

pinMode(scissorsInPin, INPUT);

 pinMode(winlossLEDPin, OUTPUT);

pinMode(restartPin, INPUT);

pinMode(inputReceived, OUTPUT);

setDestination();                           // set XBee’s destination address:

 

blink(winlossLEDPin, 3);                                   // blink the winloss LED

newGame();                                  // initialize variables for a new game

}

 

void setDestination() {

 // put the radio in command mode:

Serial.print(”+++”);

// wait for the radio to respond with “OK\r”

char thisByte = 0;

while (thisByte != ‘\r’) {

 

       if (Serial.available() > 0) {

                  thisByte = Serial.read();

         }

     }// set the destination address, using 16-bit addressing.

 // if you’re using two radios, one radio’s destination

 // should be the other radio’s MY address, and vice versa:

 

Serial.print(”ATDH0, DL5678\r”);

// set my address using 16-bit addressing:

Serial.print(”ATMY1234\r”);

 

// set the PAN ID. If you’re working in a place where many people

 

// are using XBees, you should set your own PAN ID distinct

// from other projects.

Serial.print(”ATID1492\r”);// put the radio in data mode:

Serial.print(”ATCN\r”);

}

// Blink the specified LED:

 

 

 

void blink(int pinNum, int howManyTimes) {

 

         for (int i=0; i< howManyTimes; i++) {

                  digitalWrite(pinNum, HIGH);

                  delay(200);

                digitalWrite(pinNum, LOW);

                  delay(200);

            }

                   }

 

 

void loop() {

// zeroth, check for a restart

 

if (digitalRead(restartPin) == HIGH) {  

newGame();

} // first, check for input from the opponent

if ((!opponentReady) && (Serial.available() >= 2)) { 

// listen for incoming serial data

 

digitalWrite(rxLED, HIGH);

// turn on the rx LED whenever you’re reading data:

handleSerial();

digitalWrite(rxLED, LOW);

delay(200);

}

else {  digitalWrite(rxLED, LOW);

// turn off the rx LED when there’s no incoming data:}

// second, check for input from the switches

selfChoice = getChoice();

 

if (selfReady) { 

// if the user is ready, send the value - note this is only ever true when //selfChoice has a valid value

 

digitalWrite(txLED, HIGH); // light the tx LED to say you’re sending:

 

 Serial.print(selfChoice, DEC);                        // send the choice

 

  delay(20);

 

Serial.print(’\r’, DEC);    // send a carriage return to meet protocol   digitalWrite(txLED, LOW);   // turn off the tx LED

delay(txrxDelay);

}

// if input has been received from both, finish the game

if (opponentReady && selfReady) {

 

scoreCount += determineWinner();

while (digitalRead(restartPin) == LOW) {

 

 // wait until the new game button has been pressed

         }

 

    }

}

 

int getChoice() {

if (selfReady) {  // if we already are ready, we cannot change our choice

 

    return selfChoice;

  }

    selfReady = true;

 

  if (digitalRead(rockInPin) == HIGH) {     

// if the rock switch is pressed, return R
    return ‘0′;

       } else if (digitalRead(paperInPin) == HIGH) {    

// if the paper switch is pressed, return P
    return ‘1′;

 

 } else if (digitalRead(scissorsInPin) == HIGH) { 

 // if the scissors switch is pressed, return S
    return ‘2′; 

  }

 

  selfReady = false;

 return ‘4′;

}

 

 

void handleSerial() {

 

 int firstByte = Serial.read();                                        

  // read the input (this only gets called when the buffer is not empty

int secondByte = Serial.read();

 

  if (((firstByte == ‘0′) || (firstByte == ‘1′) || (firstByte == ‘2′)) && (secondByte == ‘\r’)) {       

// if it is a valid input byte character

   opponentChoice = firstByte;                                        

// store it and return

opponentReady = true;                                           

// the opponent is ready and we have his value  

digitalWrite(inputReceived, HIGH);

 }

 

    }

     int determineWinner() {                                     // returns 0 for tie or a loss, 1 for win (from perspective of self)       

 

 

 

         if (opponentChoice == ‘0′) {

// first, indicate what the opponent chose

 

digitalWrite(rockRxLED, HIGH);

          }

          else if (opponentChoice == ‘1′) {

               digitalWrite(paperRxLED, HIGH);

            }

          else if (opponentChoice == ‘2′) {

                    digitalWrite(scissorsRxLED, HIGH);                   

             }// then figure out who won:

              if (opponentChoice == selfChoice) {  // if there was a tie              

        digitalWrite(winlossLEDPin, HIGH);

return(0);

}

 if (((opponentChoice == ‘0′) && (selfChoice == ‘1′)) ||   // if you won

   ((opponentChoice == ‘1′) && (selfChoice == ‘2′)) ||

((opponentChoice == ‘2′) && (selfChoice == ‘0′))) {

 

         digitalWrite(winlossLEDPin, HIGH);

return(1;

} else {                                                 // otherwise, you lost

     digitalWrite(winlossLEDPin, LOW);return(0);

}

}// ALSO IMPLEMENT NEW GAME ON OTHER ARDUINO SO THAT //ONE DOESNT RESET WITHOUT THE OTHER!

 

void newGame() {

Serial.flush();

opponentReady = false;

selfReady = false;

opponentChoice = ‘4′;

selfChoice = ‘4′;

digitalWrite(winlossLEDPin, LOW);

digitalWrite(inputReceived, LOW);

blink(txLED, 1);

blink(rxLED, 1);

blink(rockRxLED, 1);

blink(paperRxLED, 1);

blink(scissorsRxLED, 1);

}

Assignment#3-Rock, Paper, Scissors

For Assignment #3, Steven and I recreated the game, “Rock, Paper, Scissors” using XBee radios.  The game allowed two users to select from three switches (representing rock, paper and scissors, respectively) and reset the game.  After selecting a choice, the choice would be displayed along with a light indicating if there was a winner or a tie. 

Click here for Steven’s Arduino code.

Here are the two boards wired up:Board #1rpsboard11.jpg 

Board #2board21.jpg

Here is board #1 after that player has won:rpsboard1_setup1.jpg

Here is board #2 after that player has won: rpsboard2_setup1.jpg

“Glow the led”-Assignment2

For our 2nd assignment for “Sociable Objects”, Stella and I partnered together to glow leds wirelessly using potentiometers. We followed the schematic in Chapter 9 of “Making Things Talk” and also uploaded the code to our Arduinos. The only change to the code was that I switched the MY and destination addresses on my code so that when I turned my pot, the led on Stella’s breadboard would light up and when she turned her pot, the led on my board would light up. After Rob pointed out that the RX and TX pins were reversed on one board, the code worked perfectly. Here are some pictures from the assignment.

led1(lighting of led on board 2 using pot on board 1)

led2 (lighting of led on board 1 using pot on board 2)

led4(wide shot)

Assignment 1

“The Welcome Robot” – Assignment #1 for Sociable Objects

 

For our first assignment for Sociable Objects, we had to assess a need on the ITP floor and build a small physical computing project to address that concern.  I noticed that there are times when no one is at the front desk, so occasionally there is no one to greet you as you enter the ITP floor.  ITP is a very welcoming place, so I decided to build “The Welcome Robot” which is a small fabric robot who greets passersby at any time of the day.  When you pass by, his arm lowers to reveal a “Welcome to ITP” sign and his green eyes light up.

 

After drawing a sketch of what I wanted him to look like, I gathered materials for construction of the body.  The body of “The Welcome Robot” is made from assorted colors of felt fabric, with a PC board and resistors used as decoration.  The frame for his body is made with flexi-straws of varying colors, and they are extended upward to serve as his antennae.  Since this was only an exercise, I kept him tethered to my breadboard and Arduino. 

 

His green eyes are made from 2 SMD (size 1206) leds which I made into “led sequins” (SMD leds soldered to crimp beads) and adhered to his face with conductive thread.  He senses proximity with an Acroname Sharp Infrared Object Detector (GP2Y0A02YK) and the closer the detection, the lower his arm goes.  I made sure to program his arm not to lower past his side.  For class, I will probably demo “The Welcome Robot” with a force sensor embedded in his foot (if you press his foot, his arm will lower) instead of my range finder, since I am currently prototyping another project which uses this sensor.  His arm is powered by a servo.  I ended up leaving my standard servo at school over the holiday weekend, so I had to use my feather servo, the smallest servo made.  It is not really ideal since it is very tiny and not meant for much stress, but since Assignment #1 was a warm-up assignment, the feather servo communicates what I wanted “The Welcome Robot” to do.

 

Here are some pictures from the process:

robot(Welcome Robot)

Design (design)

XBeeRadioBreakoutBoard_Soldering

Thursday (May 22), I spent the morning soldering male and female headers to my XBee breakout board.  I used the picture at
Sparkfun (3rd picture) to make sure that I soldered female headers on the 2 out rows (on the side which is printed with pin numbers) and I soldered male headers on the 2 inner rows (on the underside of the breakout board).  I found that it was much easier to plug the male headers into my breadboard and then solder the breakout board to the headers. This technique insured that the male headers were completely straight. Now I am ready for the configuring process!

Here is a picture of my two soldered breakout boards:
soldered boards

ReadingsResponse_Week1

Response on May 19, 2008 Readings for “Sociable Objects”

“The most profound technologies are those that disappear” and even more so, the most profound are those which are not seen as technologies at all.  Writing has become an extension of human consciousness, and it is Mark Weiser’s goal that ubiquitous computing, the seamless integration of computers into every single facet of human life, be elevated to the status of writing.  He fails to mention that writing took hundreds of years to bee seen, not as a threat to memory and culture, but as an indispensable tool responsible for the advancement of human capabilities.   It is also interesting that he never addresses why ubiquitous computing should be a reality at all.  For him, it is an obvious necessity.

Since Weiser wrote “Computers for the 21st Century” in 1991, the acceptance of ubiquitous computing, best represented by the reception of objects that can communicate, has grown tremendously.  Keeping in mind the history of philosophy and human cognition, there is still an understandable hesitance that the widespread integration of circuits into every single arena would in some way signal the death of humanism and the birth of some sort of mechahumanism.  It is true that surrendering our existence to machines would mean a new way of interacting and existing with each other and with the objects surround us, but the question of it being a dire prospect is one which remains to be answered.

What does it mean for objects to be able to talk and interpret and in some way think?  In “A World of Connections”, the collection of articles from The Economist,  we see the practical considerations of bringing uibiquitous computing to fruition.  The authors highlight the economic (integrating wireless technology is expensive) and the bureaucratic (diverse industries have to compromise and communicate) aspects which hinder the integration of wireless technology.  We learn that the technology is advancing at an unprecedented rate, but that is not enough to insure that within twenty years our toasters will be able to talk to our coffee makers.  A simple question, which never comes up in either article, is if we really want all existing objects to be able to speak amongst themselves.

Ideally, successful ubiquitous computing would be that which allows humans to communicate better and be more productive (of course, “communicate” and “productive” need clarifying as well), and I understand Weiser’s insistence that this success will only come when they become invisible, behind-the-scenes workers who live only to improve life.  The optimist’s emphasis remains on the perpetuation of the human, but the pessimist’s focus is on the opposite.

In August 2026: There Will Come Soft Rains”, Ray Bradbury presents a chilling picture of a world where mechanical/electrical/digital technologies blindly continue doing what they do despite the complete absence of the human.  Sprinklers continue to water the grass, mechanic maids do their daily cleaning and electric sensor control the temperature just as they were programmed to do.  They become a haunting reminder of good intentions and idealistic desires gone terribly wrong.  Machine remains after man has mysteriously disappeared, but it is interesting that Bradbury lets nature have the last word.  Man historic attempts to conquer nature go ultimately unrealized.

There has to be a balance between Bradbury’s apocalyptic future and Weiser’s utopia where machine does man’s bidding invisibly and obediently.

EngineeringQuilt_Description_AND_Materials

This quilt highlights innovators in mechanics, engineering and computer technology.  This quilt will function similarly to the Medicine Panel in that the user will be able to match names with inventions.  Instead of a green and red led response however, a feather servo motor will indicate a “yes” or “no” answer.  Also, instead of the circuitry being embedded and as invisible as possible, the electrical components will be on top of the quilt.  I have always loved those see-through clocks which allow people to see the gears and inner workings, so I am applying the same idea here.  Here is the list of materials I am using for the Engineering Quilt. 

  • assorted calico fabrics; Joann (www.joann.com) and Hancock (www.hancockfabrics.com) Fabric stores
  • cotton batting (used as the middle layer of the quilt); Hancock (www.hancockfabrics.com) Fabric store
  • assorted notions like quilting pins, regular pins, needles, regular sewing thread; Joann (www.joann.com) and Hancock (www.hancockfabrics.com) Fabric stores
  • quilting tools (rotary cutter and mat); Joann (www.joann.com)
  • quilting thread and hand quilting thread (it is very important that if you will be hand quilting, you use thread that is called “hand quilting thread”, otherwise if you are maching quilting, use thread called “quilting thread”; City Quilter’s (located at 133 W 25th Street btn 6th and 7th avenues–the only store totally dedicated to quilting in Manhattan!)
  • assorted embroidery thread (these come in cotton, rayon and metallic); City Quilter’s, Herrschner’s (www.herrschners.com) specializes in thread and crafts and Tinsel Trading Company( 47W 38th Street) specializes in vintage and specialty threads.
  • conductive thread; Sparkfun (www.sparkfun.com)
  • feather servo motor; Jameco (www.jameco.com)
  • assorted gears and sprockets (used for decoration); Jameco (www.jameco.com)
  • Zelt conductive fabric; Less EMF (www.lessemf.com)
  • wrapping wire, pliers, soldering gun, breadboard, leds, resistors, votage divider, capacitors, etc; PComp lab kit
  • MedicinePanel_Finished

    Here is the Medicine Quilt with the binding attached: Medicine_Quilt_Finished

    NaturalSciencesQuilt_Finished

    Here is the Natural Sciences Quilt totally finished!

    natsci1.jpg