DuelingDresses_SociableObjects_Final
Below is our Power Point presentation as well as a link to one of the mockup tests for print change.
No Comments »
Filed under: Sociable_Objects, ITP
Below is our Power Point presentation as well as a link to one of the mockup tests for print change.
No Comments »
Filed under: Sociable_Objects, ITP
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);
}
1 Comment »
Filed under: Sociable_Objects, ITP
Click here for Steven’s Arduino code.
Here are the two boards wired up:Board #1
Here is board #1 after that player has won:
Here is board #2 after that player has won: ![]()
No Comments »
Filed under: Sociable_Objects, ITP
(lighting of led on board 2 using pot on board 1)
(lighting of led on board 1 using pot on board 2)
No Comments »
Filed under: Sociable_Objects, ITP
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:
No Comments »
Filed under: Sociable_Objects, ITP
Here is a picture of my two soldered breakout boards:
![]()
No Comments »
Filed under: Sociable_Objects, ITP
“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.
No Comments »
Filed under: Sociable_Objects, ITP
No Comments »
Filed under: Wearables/Inventionism, ITP
No Comments »
Filed under: Wearables/Inventionism, ITP
No Comments »
Filed under: ITP