Arduino Ambient Orb Weather Predictor Revisited

 

Back in February, I posted about some new enclosures I’d built for my weather beacon.

This weekend, I finally got around to tweaking the code for my beacon. I was inspired to work on it after receiving one of ThingMs spiffy new MaxM’s. They’re nice and bright and will work with any BlinkM code you may have already written.

I’m pretty happy with how my beacon works now. After my initial post, I got an email from Dave Lemons. Dave took my initial cobbled-together code and added the pulse support I’d been meaning to implement. I wanted the beacon to pulse according to the forecasted chance of precipitation. Dave’s code used delay()’s to effect the pulses. I found that when I hooked this up to my Processing script that’d pull in the weather data, I got no response from the beacon. It looks like the Processing script was delivering the data while the Arduino was “sleeping” during a delay().

So… I rewrote Dave’s code to offload the pulsing effect to a BlinkM script, saved on the MaxM. That frees up the Arduino code so that it pretty much just sits there and waits for input.

If you’d like to play around with this project, here’s my code. Be gentle… my code reads a bit like someone learning to swear phonetically in a foreign language. It might be ugly, but it gets the job done. There are 3 parts to the project:

  1. PHP code that checks the Yahoo! Weather API. You’ll need to put this code on a Web server of some sort. This code translates the weather forecast into a color(RGB hex) and a pulse code. It’ll also dump out XML – I’ve been experimenting with implementing a beacon in Flash on my Chumby. It looks like I’m using an old URL for the API, but it appears to be working OK. Put that on my TODO list.
  2. Processing code that sits on your computer that periodically checks the PHP in code 1, then delivers the color/pulse info to your Arduino.
  3. The Arduino code that parses the input from step 2 and sends the appropriate instructions to your BlinkM.

Download the code here.

The code might be a bit ugly. Give a yell if you run into a snag or make some improvements.

Sesame Street – 30 Rocks

http://www.youtube.com/watch?v=8vxv7qi3BJI

“Do these look like marshmallows?”

Protected: mix: petition

This content is password protected. To view it please enter your password below:

Obama's Election Night Flickr Set

How cool is it to have a president that has a Flickr account.

I Keep Faith

Last weekend, Holly and I went to see the always-excelent-live Billy Bragg at Duke’s Page Auditorium. The show was part of Duke Performance’s Art/Politics/Now series of events.

Billy played an awesome solo set (~2 hours!) touching on old favorites and ranging to songs from his latest album. He opened with (the surprisingly racy!) Ingrid Bergman, a track from the Mermaid Avenue album that paired Bragg with Wilco to put words to lyrics mined from Woody Guthrie’s archives. He finished up with show-openers The Watson Twins joining Billy to perform the hymn-like Sing Their Souls Back Home.

Bragg’s new album is titled Mr. Love and Justice, but much of the night’s set focused on the justice, highlighted by the Clash-inspired Milkman of Human Kindness and the opener, Help Save the Youth of America. Billy provided a lot of very entertaining between-song banter. I think that his back-story of the song Ingrid Bergman was probably longer than the playing of the song itself.

It was an absolutely great show. I’m a firm believer in the power of one man and a guitar.