Journal of Networked Objects
April 12th
Today I worked through the principles of PWM and how that relates to RGB. I am not sure I understand it completely yet but I am on my way. My previous concern that I would be the sole person working in RF has since switched to everybody it seems, which could make the frequency difficult to work with. The good news is that most, if not all, as far as I know are using the other module from SparkFun which is good news.
April 7th
Today during class, after rewiring, and recoding I got the transmitters working. I had missed a few details so the code was not executing the function I dwesired. My next step is to integrate the PWM code for the RGBs. The hurdles that remain will be this, and then taking it the final step to have five seperate units all working together, with five 16 LED matrixes.
April 6th
It is important to note at this point that I have not for one day stopped working on this project, though it is nearlya week since my last post. I wonder is my therapy is the frustration found in the RF. Today I worked for countless hours through what has proved to be working code. One would think that inside of three hundred lines of code one could find something. I however am at an impass. It is to the point that I would never know. And that would be if the RF trnacievers were not woking themselves, which is a very real possibility. I remain unsure of of one single area within the code that could or could not be the issue. It is the TRISB and TRISC function which I think needs to be adjusted. My code mirrors a working code on a bigger chip so I am very close. However beside the configuation blink of the LED I am at an impass. Tomorrow in class I hope to finalize the functionality.
March 20-April 1st.
On the day of fools i decided to get back into the project. After a switch up of voltage regulators and a rather long debug I feel pretty confident that the boards are both functional. However the code is an entirely different story. I collected working code from a variety of peoplein an attmpt to learn what the code actually means. This turned into a rather ardious task as each version was quite a bit of code. I ended up trying many alternitives to no avail.
March 19, 2006
This week I have started working with the RF-2.4Ghz Transceivers. I am impressed by how difficult the process is. I wired up two boards and as soon as possible I will be programming the PIC. For this application, and because i had them, I am using the 10F-200 PIC chip which is a very small eight pin chip. I hope that I can make it work. Ideally I will be using a total of five in a network. At this point however I need only one transmitter, as i have no data returning from the remote cards. This is mainly due to a design challenge. What is frustrating is that with six weeks left in the semester I still have no project.
March 12, 2006
Initially I had imagined a few projects very different from the direction I attend to now. My first was to have a toy stuffed animal that converted Text- to-Speech via a network/web socket. Online messages could be sent to the Fido and spoken out load. The application's only difficulty really seemed to be the conversion of these speech files into MIDI, the format the toy is constructed in. Over time this changed. I didn't want to have a tangential project, which I feel happens often. So through my work in other classes, and my research for a possible Thesis project I will be using RF Transceivers in a network. I have five of them, and I am looking forward to exploring the possibilities. My goal is to use these Transceivers underwater as a method of communication between a series of AUVs, autonomous underwater vehicles. This goal has a large number of hurdles to surpass and the RF is on of the smallest.
Playing Games- Tirtiary Contruction
My group consisted of three, hence the title. I was asked to join the group of Alice Tseng-Planas, Chunxi Jiang. Our first step was to insure that our Xports were communicating over the network; This process proved to be a significant hold up, as there were diffrent codes posted for this process. Tom Igoe's code used the standard call and response cycle while Patrick Dwyer's code continually output information. another discrepency wass found in the flush rate, this remains a bit of a mysteryas we remain unsire whether the changes we made had an effect or if it was strictly server side performance. However in the end, through hours of fine tuning the Xport was configured. Once this was achieved we could begin the work on our game. This step was found to be a rather sensitive process, though eventually functionality was established.
The group was benefited by the fact that both Alice and Chunxi are experienced with programming, certainly more than myself. Through the initial phase of the .php code much of the class worked together in the lab. We ended up basing our script off of Michael del Gadio’s php script, since he was having success with the server. (Thanks Michael). It became immediately evident that this method of data aquisition was a very slow process, which eventually effcted the pace of our functionality.
It is important to note that we decided to use two buttons for the game, each button was connected to an Xport. So we had two players. The object was to affect the graphical interface by pressing the button as many times as possible within the allotted time. Which means that the greater the number of clicks the greater amount of change.
Chunxi was our PIC programmer and once the .php scripts were running, was able to fine tune and perfect the code on the boards. Due to the latency of the Http connection every 10 seconds the PIC would count button clicks and after each cycle a call would be made to the xport with the total values of the clicks. To collect the ‘clicks’ we used edge detection and to smooth out problems we added some debouncing code which we found off of Tom’s site. Setting the PIC to collect the total number of clicks from a timed cycle and outputting the final value encouraged rapid clicking.
My job was to work in Processing. I spent the entire weekend reviewing examples and trying to fit that code within our parameters. It became immediately obvious that this was no easy task.
Our initial design was a game through which players "raced" to the top of the screen along a predetermined set of points. The code that enticed this idea most fluently was:
//Person p;
Person p2;
Person p3;
//Stringy s;
void setup()
{
size(200, 200);
framerate(30);
background(255);
smooth();
stroke(0);
fill(255);
//p = new Person(75, 150, 1, 0);
p2 = new Person(66, 100, 3, 0);
p3 = new Person(132, 100, 3, 0);
//s = new Stringy();
}
void draw()
{
background(255);
// Make them suffer >:)
if(mousePressed)
{
//if(mouseButton == LEFT)
//{
// p.particles[p.base_part].moveTo(mouseX-9, mouseY, 0);
// p.particles[p.base_part].velocity().clear();
//}
if(mouseButton == LEFT)
{
p2.particles[p2.base_part].moveTo(mouseX-9,mouseY, 0);
p2.particles[p2.base_part].velocity().clear();
}
if(mouseButton == RIGHT || mouseButton == CENTER)
{
p3.particles[p3.base_part].moveTo(mouseX-9, mouseY, 0);
p3.particles[p3.base_part].velocity().clear();
}
}
// Move them
//p.step();
p2.step();
p3.step();
//s.step();
// Draw them
//p.show();
fill(0, 240, 0);
p2.show();
fill(0, 0, 240);
p3.show();
//s.show();
}
This is a very nice interface designed by () which has two figures that follow the mouse buttons. Initially I thought it would be quite easy to coordinate location based upon the text file output from the Xport. After completing the project and working through this step on simpler code, I now find the edit to be quite possible.
Once we began the process and began working with the two text files, this interface deemed itself too complex, mainly for my own digestion, to achieve any marked results. Once this was determined, and after we had conferenced on the project, I resumed my search for an applicable interface. 
My difficulty in processing, rather my design challenge involved the utilization of the data sent via text to the applet. I was thoroughly unsure of how to convey the established range graphically. Once the group worked through it I understood, though my code knowledge is rudimentary at best. I can say that I did find a graphical interface that achieved the goals of the project, and established proof of concept. Gilad helped us work through the finer points of the Load.String command.
In the end of our development stage and into our implementation stage Processing was arguably our sticking point. The interface though abstract, did mirror a loose concept based on the fractal images witnessed over distance, which was what potentially we were doing by communicating over the network.
Imagine if you will a lantern waving high atop a church steeple in the cold of night, the light seems to reach out through the darkness. That was the concept upon which we built.
For the assignment I believe we were a successful team.
Here is the Processing Code we used:
int eggs = 15; //this establishes the size of the initial spere found in the upper left hand corner or the applet.
float x[] = new float [eggs];
float y[] = new float [eggs];
float y2[] = new float [eggs];
float x2[] = new float [eggs];
void setup()
{
size (800, 400); //window size
smooth();
noStroke();
fill (0,0,255,100) ; //color of the fractal beam
framerate(30);// speed
}
void draw()
{
String url1 = "http://stage.itp.nyu.edu/~cj520/netobjects/player1.txt"; // this is the text file that for the data aquisition for player 1
String[] lines1 = loadStrings(url1);
String url2 = "http://stage.itp.nyu.edu/~cj520/netobjects/player2.txt"; // this is the text file that for the data aquisition for player 2
String[] lines2 = loadStrings(url2);
// parse player1
int token1 = lines1[0].indexOf(":");
String tmpStr=lines1[0].substring(token1+1);
int token2 = tmpStr.indexOf(":");
// parse the two sides of the ':' and turn into integers
String String1 = tmpStr.substring(0,token2);
//String String2 = tmpStr.substring(token2+1,tmpStr.length());
int Pos1= int(String1)*2;
token1 = lines2[0].indexOf(":");
tmpStr=lines2[0].substring(token1+1);
token2 = tmpStr.indexOf(":");
// parse the two sides of the ':' and turn into integers
String String3 = tmpStr.substring(0,token2);
String String4 = tmpStr.substring(token2+1,tmpStr.length());
int Pos2= int(String3)*2;
background(255,111,111);
//shifts all x and y values over by -1
for(int i=1; i<eggs; i++){
x[i-1] = x[i];
y[i-1] = y[i];
x2[i-1] = x2[i];
y2[i-1] =y2[i];
}
//mouse triggers movement and position
x[eggs-10] = 30;
y[eggs-10] = Pos1;
x2[eggs-10] = 636;
y2[eggs-10] = Pos2;
println("Pos1 "+Pos1+" "+"Pos2 "+Pos2);
for(int i=0; i<eggs; i++){
triangle(x[i]+300, y[i]+100, i/4, i/4, 83, 75);
line(x[i]+300, y[i]+110, y[i], x[i]);
ellipse(x[i]+300, y[i]+100, 2*i, 2*i);
//array triggers color and fill as well
stroke(x[1],y[i],x[i],150);
fill (y[1],x[i],x[i],150);
triangle(x2[i], y2[i]+100, i/4, i/4, 83, 75);
line(x2[i], y2[i]+110, y2[i], x2[i]);
ellipse(x2[i], y2[i]+100, 2*i, 2*i);
//array triggers color and fill as well
stroke(x2[1],y2[i],x[i],150);
fill (y2[1],x2[i],x[i],150);
//if mouse is pressed colors change and ellipses grow triangle closes
if (mousePressed){
triangle(x[4]+300, y[4], i/4, i/4, 83, 75);
ellipse(x[i]+300, y[i], 50, 50);
stroke(y[1],x[i],y[i],150);
fill (x[1],y[i],y[i],150);
triangle(x2[4], y2[4], i/4, i/4, 83, 75);
ellipse(x2[i], y2[i], 50, 50);
stroke(y2[1],x2[i],y2[i],150);
fill (x2[1],y2[i],y2[i],150);
}
}
}

And here is a copy of the strait Java Code: and a Link to a Java resource on Strings:
import java.io.*;
public class IOtest{
public static void main(String[] args) {
try{
DataInputStream input = new DataInputStream(
new BufferedInputStream(
new FileInputStream("E://Network Objects/player1.txt")));
String myString = input.readLine();
int i = Integer.valueOf(myString).intValue();
System.out.println(i));
}catch(Exception e){
System.out.println("End");
}
}
}
Finally The PIC Code for a 16F252 Chip in MicroCode Studio:
DEFINE OSC 20
input PORTC.1
CURRENT VAR BYTE
PAST VAR BYTE
NUMBER VAR BYTE
I VAR WORD
true9600 con 84
' Our serial communication pins
tx var PORTC.6
rx var PORTC.7
' Used to read response from the XPort
inByte var byte
' Track whether or not we are connected to the remote server
connected var bit
connected = 0
pause 5000
PAST = 0
I = 0
NUMBER = 0
main:
if connected = 1 then
FOR I = 0 TO 50000
CURRENT = PORTC.1
IF CURRENT <> PAST THEN
IF CURRENT = 1 THEN
NUMBER = NUMBER + 1
ENDIF
PAST = CURRENT
ENDIF
NEXT I
' If we're already connected then we can send our message
gosub http_request
NUMBER = 0
' back off the server for a few seconds
pause 500
else
' try and connect
gosub xport_connect
endif
goto main
xport_connect:
serout2 tx, true9600, ["C128.122.253.189/80", 10]
connected = 1
return
http_request:
SEROUT2 TX, true9600, ["GET /~cj520/netobjects/fileWriter.php?picVars=",DEC NUMBER]
serout2 tx, true9600, [" HTTP/1.1", 10]
SEROUT2 tx, true9600, ["HOST: itp.nyu.edu", 10]
SEROUT2 tx, true9600, ["User-Agent: Mozilla/4.0(compatible;MSIE 5.23;Mac_PowerPC)"]
serout2 tx, true9600, [10, 10]
' wait for bytes from server:
' Our server sends a 0 to finish
while inByte <> 0
serin2 rx, true9600, [inByte]
wend
' now we're disconnected:
connected = 0
return
Here is the .php that we eventually used:
<?php
$filenameA ='player1.txt';
$filenameB ='player2.txt';
$player1 = ':'.$_GET['player1'].':';
$player2 = ':'.$_GET['player2'].':';
// Make sure the file exists and is writable
if (is_writable($filenameA)&&is_writable($filenameB)) {
// Right we're opening $filename in append mode.
// This may change in the near future...
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handleA = fopen($filenameA,'w+')){
echo 'Cannot open file ('.$filenameA.')';
exit;
}
if (!$handleB = fopen($filenameB,'w+')){
echo 'Cannot open file ('.$filenameB.')';
exit;
}
// Write $picVars to our opened file.
if (fwrite($handleA,$player1) === FALSE){
echo 'Cannot write to file ('.$filenameA.')';
exit;
}
if (fwrite($handleB,$player2) === FALSE){
echo 'Cannot write to file ('.$filenameB.')';
exit;
}
//echo 'Success, wrote ('.$player1.') to file ('.$filenameA.')<br />\n';
//echo 'Success, wrote ('.$player2.') to file ('.$filenameB.')';
fclose($handleA);
fclose($handleB);
} else {
echo 'The file '.$filenameA.' is not writable<br />\n';
echo 'The file '.$filenameB.' is not writable';
}
?>
Overall this project was a success, educational and enjoyable. Especially the patience of my team. Whom with it would be an honor to work with in the future. Everyone in the class, in truth, worked through these porblems together and discussed the debugging and trouble shooting process at length over the course of the week.
Context Awareness
The importance of context can not be over stressed or evaluated. In every situation the possibilities must be regarded in full. During this weeks readings the common point was that such had occured. We reviewed the work of IDEO the well known Britsh design firm. The introduction was to the BBCi project, though through deeper research it was evident that IDEO is doing extensive work in this field. In my research I reviewed four projects were completely customizable. The second project I looked at was the WaveFinder which monitored signal streath through the use of LEDs. Again these devices was asthetic and functional. The next project I looked at was the Three Goldfish and a Computer. Through the use of color tracking the interface of the information kiosk of the NCR was manipulated according to the fish. This clever use of the natural world, I hope, probably protected their secrets accordingly. The final project was the most profound, albiet quite simple, it was the interactive cube. Through a collaboration with the design team and the architects of the Vodophone global headquaters an interactive cube was created offshore that mirrored signals sent from the offices. Through these projects it was evident that networks have a very real and possible ability for connection.
The next segment concerned a project in Dublin using lights, called the Vectoral Elevation project. This event, much like the two towers project showed a possibility of influence far broader than simply the connected society. This project, due to my most recent studies recalled the utilization of such media for propoganda. In all cases giant beams if light shining deep into the stratosphere is influential.
Calm Ubiquity
Following the class introduction the reading reiterated the points of the OSI Model as well as the TCP/IP stratification of Network hierarchy. The first reading was essentially what we covered in class.
Into the second, we moved into the realm of Calm Technology, or as Marshall McLuhan would say, Cold Media. The evolution of Calm technology is inevitable. Technology has traveled the road to near complete inundation, I now feel that society would like to step back a step, this while maintaining their connection. I think that we will find that most people whose lives are surrounded by technology would rather have it more autonomous. Calm technology is just that. As we move into what has been termed Ubiquitous Computing, this is the trend. Through our readings we were introduced to two organizations aimed at discovering, evaluating, and discussing this evolution. No longer are we tied to a desk top, in fact the opposite is true. Within ITP it would essentially be possible to have all courses, list-serves and communication stemming from a single late model hand held device, and they would have the benefit of transciency. This essentially is the aim of Calm technology, to not have to worry, and to be able to take it with you. Both the Equator Project and The Disappearing Computer have their sights set on a future where we essentially go on the road.
The final reading concerned physical surrogates. This study stemmed from Calgary where I think the winters are long and lonely, but that might by too grand an assumption. Surrogates, through my reading of the article were intended as a method of attaining virtual proximity. While reading I was constantly trying to think of a device that could move this technology either away from strait monitoring, such as a corporation watching it's employees. In that regard a multinational company could easily see the benefits, by the time the New York Office was rolling, the LA office would be getting started. These devices could serve as a window into productivity, but only if the time zones were sequential. It would serve a negative purpose for NY to watch LA, as there would be a reduction in productivity. In the first example the NY office would serve as a rally call to get working. On the other side of this I could easily see the benefits of remote personal connection. My difficulty with this was that it essentially would just become another gadget, of which, I feel, is only a passing trend, therefore transient. Throughout the reading I was unable to discover middle ground.
I find, however, a great benefit in this notion of the Ubiquitous. The technology is a bit intrusive with RFID, but a unified single ID would have great benefits. If I could carry a single card for every action it would be wonderful. Groceries, Phone, Computer, Home. . ect. If with a swipe of a card at a remote station I could access the contents of my Fridge I would love it. I don't think I would implant an RFID despite the benefits, I would certainly consider an RFID cufflink however. Such would illuminate my need for the card. In this event I also see the potential for proximity screens that illuminated non-personal data as you walked by, such as schedule, messages, even urgent email. This is a delicate path but it certainly is one I see with vast potential. In the end I believe the end would justify the means. If a citizen were kidnapped in the jungles of Nicaragua, I see the RFID technology as priceless. Help could immediately be on its way.
This has already started with GPS mobile tracking, which I don't find intrusive. In fact when the light of these new monitoring abilities was shown, I immediately resigned to the fact that it would eventually happen, if it hadn't already and "They" were just letting on diplomatically. I also should mention here that there is a Church in Texas that believes it has, and the classification that will eventually occur will be mandatory. This fear was taken even further as they believed that God would one day arrive, and I think they had a date, and he wouldn't take anyone so equipped with tracking devices. I could understand the organic audited approach, but I can't say I agree. I believe this is because even when I found out about the church, about five years ago, I felt that I had enough information to make an educated decision.
That was even before I really knew.
This week and because of the surrogate article I am now interested in Ethernet powered devices. . . .(PoE) This is a very interesting development, though plausibly involves a series of hurdles to cross.