I’ve recently begun to experiment with an open-source hardware platform called Arduino. Arduino is kinda like an amped-up basic stamp. You program it using C via a handy standardized cross-platform GUI. There’s an active community around the platform and lots of good example code out there to farm and repurpose.
It’s exciting: I can actually write programs that interface with the ‘real world’. Arduinos can sense temperature, light, heat, touch, etc via whatever sensor you care to connect to it. It has a bunch of digital and analog inputs and outputs, allowing you to Frankenstein a wide variety of fun projects.
I received most of my help from Lady Ada’s awesome tutorials. Once I was comfortable, I began to work on some personal projects.
Todbot featured a cool project that let you grab a color from a Web page and display it as a color using LEDs connected to an Arduino. I built a similar Orb using Tod’s (via ThingM) BlinkMs. The BlinkMs (as seen on BoingBoing) are “smart LEDs” that allow you to output a color based on RGB or HSB color input. My prototype currently uses 2 BlinkMs and it’s reasonably bright.
The code grabs today’s forecasted high temp based on a zip code using Yahoo!’s APIs and maps the temp to an RGB color (ala #ff0000), returning XML containing the temp and the chance of precip. After 3pm, it should display tomorrow’s forecast.
I mixed Todbot’s example and my own PHP and I now have a pretty decent Arduino Ambient Orb Weather Predictor.
So… program 1 (PHP) lives on a Web server and grabs data from Yahoo!, program 2 (Processing) runs on my PC and grabs output from program 1, then reports it to program 3 (Arduino) that displays the color.
If you want the code: weather predictor PHP.
You’ll need PHP5 (I used simplexml). There’s lots there that needs to be cleaned up and I’ve only partially implemented the precipitation pulse. If you find it useful, please let me know.