Monday, November 1, 2010

From Processing to the Web

An Arduino is connected to a PC that is running a program created in Processing. It reads the data stream from the arduino and then it can publish the data to an online service like pachube or my own server.

The main user interface of my project is going to be web based so it can be used on all sorts of devices from laptops to cellphones. Processing doesn't make a very good webserver to build an interface around however there is some really good webserver software - Apache, PHP and MySQL.

Linking the webserver to the Processing program is a bit of challenge. A webserver doesn't typically have a program always running, rather the program runs only when generating a web page. To send data to the webserver involved calling a webpage with get/post data. For the webserver to send data to the Processing sketch involves using a simple socket server. I haven't found any example of this online but I think I can combine some of this processing code and some of this php code and make it work.

Update: there is a better way to connect things- XML RPC

No comments:

Post a Comment