Hacking Hardware for Software Control


I attended a really interesting session by Jonathan Oxer at OSCON yesterday. The focus was on connecting the virtual with the physical; hacking hardware and controlling it from the virtual world.

Jonathan is apparently the McGyver of cyber/physical mashups and seems to have automated everything in or near his home: mailbox, lighting, blinds with motors, sprinkler systems (that check the weather and sample soil moisture before starting up), and etc.

What he demonstrated in the tutorial was a Second Life avatar actuating a real world appliance something like this… a scripted object in Second Life initiates an outbound HTTP connection when “touched” by an avatar. That outbound HTTP initiates a script on a remote webserver that talks to that machine’s USB serial port (that is a slight simplification, because he couldn’t get a fixed IP at OSCON there were actually two web servers involved). Connected to the serial port is an open source / open hardware Arduino (http://www.arduino.cc/) board.

The Arduino board was programmed so that one value on the serial port would actuate an attached relay, and a second value would actuate a second attached relay.

The relays were in turn connected to a busted open and hacked radio remote control to a cheap appliance store appliance controller. (this chain of Arduino to relay to appliance controller was all about pushing up the voltage and current that could ultimately be controlled – analogous to a remote controlled power breaker).

When it was all said and done, the Arduino board served as a virtual to real world “impedance matcher” (that is an analogy fraught with problems) and when the avatar touched the object (now a virtual light switch) the light on the desk went on or off depending on its previous state.

Seems like tons of things that could be done with this kind of connection. Some Arduino examples are here.


  1. Kit - July 25, 2007 @ 4:54 pm

    Hey Jim. Have you ever seen the Gumstix? http://www.gumstix.com

    Not OS, but at $150 who cares. I’m using them on a couple of projects – the things are way cool and run a fairly complete Linux environment. There’s not really a good JVM for the ARM CPU so – that’s a downer.

  2. Jim S - July 25, 2007 @ 5:02 pm

    Hey Kit, nope never used one. They look cool though. What kinds of projects are you using them for?

  3. Kit - July 26, 2007 @ 12:09 am

    I’ve used them for prototyping sensor networks and robotic autonomy. Have an ActiveMQ-CPP client connecting to my Service Bus which links all the nodes together.

    Unfortunately, I’ve got a long list of potential projects, that I’m sure I’ll never get to.

    Now, if I could just get Zigbee on ’em then the real fun would begin…

Leave a Reply

Your email address will not be published / Required fields are marked *