On Saturday, I taught a class at NYC Resistor on a new library I've developed that I'm calling Webduino
. It's an extensible web server library for the Arduino using the Wiznet-based Ethernet shields. I've setup a Google Code project for it at http://webduino.googlecode.com/
, and it's released under the MIT license allowing all sorts of reuse. I've also put my not-quite-complete presentation up for viewing at http://tr.im/WebduinoPressy
I've got a few examples up right now -- the Buzz example interfaces with Zach's Danger Shield allowing you to remotely start and stop the speaker. We had a room full of students pinging my Arduino board on Saturday, buzzing me while I was lecturing. It was fun. The big Demo example shows how to setup an HTML form running on the device where you can read and write pins.
You use the code like a library; you install the header in the libraries folder, pull in the code using a #include, and setup the relative URLs that you want your server to handle. You can do different things for GETs and POSTs, making it easy to create forms that will give you the page with all the controls, then process the submission.
I hope to add a few more examples in the next few weeks, including a web-enabled fridge sign using a serial LCD and how to serve things other than just HTML text from the device. I also need to work on more documentation and finishing up my slides, but I think it's a great base for other people to experiment.