http://sebastiannilsson.com/en/blogg/will-it-rain/
Living in Göteborg, Sweden means that many mornings you ask yourself the question "do I need an umbrella today?". To outsource more small decisions to computers I programmed a microprocessor that respond with activating a led if an umbrella is recommended.
The idea is very simple. The microprocessor reads the weather forecast from yr.no for the next 10 hours (which is about the time I expect to be away from home). If any of these hours include rain (more than a few mm) then light the led. Unlit led obviously means no rain.
Spark Core Breadboard Light Emitting Diode Resistor Usb cable for power supply
- I run a php script which gets the next forecast from yr.no. It is published at http://sebastiannilsson.com/will-it-rain/and is relatively easy to use.
- Find the city that you want the forecast for and copy the URL.
- For example, in Gothenburg it is http://www.yr.no/sted/Sverige/V%C3%A4stra_G%C3%B6taland/G%C3%B6teborg/
- Kolbäck is http://www.yr.no/sted/Sverige/V%C3%A4stmanland/Kolb%C3%A4ck/
- Go to https://sebastiannilsson.com/will-it-rain/index.php?debug=1&threshold=0.2&yr_url=
- For example: Forecast for Gothenburg with a threshold for rain in 0.5 mm looks like this: https://sebastiannilsson.com/will-it-rain/index.php?debug=1&threshold=0.5&yr_url=http://www.yr.no/sted/Sverige/V%C3%A4stra_G%C3%B6taland/G%C3%B6teborg/
- Spark Core is a microprocessor that connects to Wifi. You upload your code to it over their cloud service.
- Get a Spark Core or similar and connect it to wifi.
- Copy my code for the Spark Core. The only needed change is the variable for the url.
- Upload