The Lego-Compatible Photon Weather Tracker!


Hackster.IO_MainPhoto

This project is a Photon-powered weather tracker that will light up different parts of a Lego scene based on the current weather! It checks the weather every hour, and uses our Novelty PTH LED bricks to light up different weather patterns. The Particle cloud makes it incredibly simple to allow your Photon to talk to the world, and hook.io can provide the power the Photon needs to deal with the rest of the internet.

It all starts with forecast.io. They provide a super simple free API to grab weather data at your location. We then use hook.io to work through that weather data and chop it up into bite-size chunks that a Photon can handle easily. Hook pushes this information to the Particle Cloud which acts like a broker between the internet and the Photon, allowing for an easy connection. Once the Photon knows the weather, it lights everything up with the help of a TLC5947 PWM chip.

The hardest part of getting this project up and running was getting data to the Photon. There are a million weather websites to get data from, and all of them need HTTP requests and send back HUGE amounts of data. Such a little chip is very good at pushing data up, but much worse at pulling it back down. By using hook.io, all the heavy lifting could be done in the cloud in no time!

This is a great little project to fiddle around with and learn some more about webhooks and LEDs!

Check out the full tutorial on Hackster: http://bit.ly/LBEHacksterIO