serial code

October 17th, 2007 admin

the following processing code parses an xml file (which is being dynamically changed via php).  depending on the value of the given fields from the xml feed, processing will send a byte to arduino via serial which will then trigger an RGB LED to emit a specific colour.

import processing.xml.*;
import processing.serial.*;

XMLElement xml;

int temperature;
String state;
String temp;
String timer;
int time;
Serial myPort;

void setup() {
size(200, 200);

myPort = new Serial(this, Serial.list()[0],9600);

}

void draw() {

xml = new XMLElement(this, “http://itp.nyu.edu/~ss4259/xmlfeed.php”);
int children = xml.getChildCount();
println(”elements “+children);

for (int i = 0; i < children; i++) {
XMLElement kid = xml.getChild(i);
int grand_kids = kid.getChildCount();

String names = kid.getStringAttribute(”values”);
println(”grand kidz:” + names);

for(int j = 0; j < grand_kids; j++){
XMLElement grand_kid = kid.getChild(j);
String stuff = grand_kid.getContent();

if(names.equals(”temp”) == true){
temp = grand_kid.getContent();
}
else if(names.equals(”state”) == true){
state = grand_kid.getContent();
}
else if(names.equals(”timer”) == true){
timer = grand_kid.getContent();
}

println(”Variables : ” + stuff);
}

//myPort.write(’A');

if (temp.equals(”33″)) {
myPort.write(’A');
}
else if(temp.equals(”250″)){
myPort.write(’B');
}
else if(temp.equals(”400″)){
myPort.write(’C');
}

else if (state.equals(”inactive”)) {
myPort.write(’D');
}

delay(150);
}
}

Posted in icm | No Comments »

week 2 homework – ajax

October 7th, 2007 admin

tutorial one

tutorial two

tutorial three  part one

tutorial three part two

tutorial three part three

tutorial three challenge [in progress]

tutorial four

Posted in home | No Comments »

physical computing – observation project

October 4th, 2007 admin

video observations

Posted in home, physical computing | No Comments »

“without thought” – Naoto Fukasawa. [reading response w2]

October 1st, 2007 admin



As a student of design it was very interesting to read this short biographical piece about Naoto Fukasawa. This was my first exposure to this artist despite being familiar with some of his previous employers, most notably IDEO.


The diversity of Fukasawa’s past, as described by Ashcraft, allowed the designer to express his independent creative voice in the later years of his career. I was interested by Fukasawa’s desire to create within his native environment. Despite developing primarily in the western world, at the height of his career the designer felt most comfortable creating in Japan. Fukasawa’s yearning to understand “…why it needed to be that shape?” represents the type of counter intuitive thought that can liberate the design world from the shackles of tradition.


original article

Posted in home | No Comments »

project 2: proposal

October 1st, 2007 admin

remote kitchen proposal

Posted in home | No Comments »