motorNet – proof of concept

quick video of a potentiometer controlling a servo motor over the interwebs.

arduino -> processing -> PHP [serverside] -> .txt file [serverside] and all the way back on the other computer.

i’ll put up code when it’s all ready to go. as it is, this is ready to go both ways, but for clarity i just filmed it going one way.

these two computers could be thousands of miles apart, just need to be online.

[thesis prototyping] :: processing to PHP, attempt one

ok nerdzors, look out. Ira told me about a project that she made that took an analog input from processing and posted it to php (and then possibly a database, not sure). i wanted to try it out for myself, so i did some searching, and of course the processing guru Daniel Shiffman had a nice tutorial on at least getting to a php script.

the php script writes to a text file that you are calling from processing. The php script i am using in this first draft is the same as Shiffmans here. once you have that up and running with all the correct permissions set on the file (read+write), you can fire up processing.

I modified his example file so that the sketch loops and constantly checks the script (+ text file) online, and updates the sketch accordingly. I inadvertantly created a collaborative drawing tool. Potentially, an infinite number of computers/machines could connect to this file that are running this processing sketch, so jessica, nick and i had a collaborative drawing session at 2 in the am.

Because you are just calling to a script that’s online, you can actually view the script at any time in a browser, and watch the coordinates get written as you create and erase them.  it would be here:

Here is my modified Processing sketch.

Here are some images of our late night drawing session — in the background you can see firefox showing all the coordinates that make up the drawing:

this started out as “OOPS”.. then became “BOOBS”… and then became this. Actually I think Jess did the whole thing ourself. But Nick and I watched.

next up, I will hook up the Arduino to Processing and turn LEDs on and off from around the world.