More Arduino Fun
Thu, 06/04/2009 - 18:57 — Sean CarneyA while back I mentioned that I received an Arduino for my birthday, I would like to continue on that topic and show what you can throw together with one.
Currently in the morning I check the weather just before I leave for work to see if I need to pack a (rain)jacket. This is annoying since I am often in a hurry and just want to get out the door, not open a browser and hunt around for the weather online. I decided that I could find a good nerdy solution to my problem using the Arduino.
The first thing I did was order an Ethernet module for the Arduino. This is a block you can stack on top of the Arduino and gives it network connectivity. On top of that, I stacked a prototyping board so I wouldn't need to do any soldering. I plugged a few LEDs into the prototyping board and the hardware bit was done.
For the software I coded a small program that checks the Environment Canada website and downloads the current weather. After checking the weather the Arduino will turn on a red light if it is above 15 degrees outside (meaning I don't need a jacket), a green light if it is sunny (always a good sign), and blink a blue light if there is a chance of rain during the day (something I don't want to see).
While this is overly complicated and nerdy, it is a easy way for me to get todays weather forecast at a glance. I'd have to say that the one problem with this is that it looks like some form of improvised bomb timer. For the next steps in this project; I hope to gut an old clock, replace the mechanism with a motor, and the face with some weather symbols so I have something that looks a bit more elegant (and less dangerous).
Edit: I have also added a simple web server to the Arduino so I can check the weather and, in the future, update settings on the Arduino. You can see the current weather via my Arduino here.
| Attachment | Size |
|---|---|
| canada-manitoba-winnipeg.php_.txt | 2.03 KB |
| weather.pde | 11.01 KB |
- 189 reads

Comments
Man, that sounds incredibly
Man, that sounds incredibly nerdy Sean, but totally cool too! Hahaha.
Code
Hi Sean, I like your ideas. I'm new to the Arduino board and I like to try your first project (with the 3 leds). Do you still have the code? How do you change it so it can look up my local weather (Melbourne)? Hope you can help.
The Weather in Melbourne
Hi James.
I uploaded the Arduino sketch and a file that resided on my server.
The rough way this works is the Arduino calls a script on my server which calls a weather page and parses it into an XML styled file so it is easy for the Arduino to read. Based on the values the Arduino receives from my server the appropriate LEDs are turned on.
The reason why everything is routed through my server is that an Arduino is really bad at string manipulation due to its limited memory. I found it easier to use my server to do the heavy lifting and pass off some nice easy data to the Arduino. If you can find a RSS weather feed for your area, the Arduino can access it directly, but I had to scrape my weather information off of a web page.
For the customization, the trick is just to find an RSS weather feed for your area and rename the tags appropriately in the sketch to match the naming convention of the feeds.
Good Luck!
Weather !!
Hi Sean,
I got it going, thanks. I used the google weather feed which is already in xml (yahoo weather is too) and just picked the bits wanted.
Thanks for putting this up and for your pointers and help.
Now to see if I can do the same with python haha!
Happy :)
James
Post new comment