Archive for November 11th, 2015
Weather Underground forecast data in text display
Posted by MB in Uncategorized on November 11, 2015
One of the uses I found for my Raspberry Pi was using it to display weather data. I retrieved the weather data from Weather Underground using their API, parsed it, and displayed it on my RPi’s small LCD. This gave me an always-on view of the weather, which was nifty, and it was done all in bash scripting with a few external programs to parse the data.
This script is very customizable and extensible. You could use it to do any number of weather-related tasks.
I reduced the font size on the LCD to Terminus 6×12 using the following command:
sudo dpkg-reconfigure console-setup
This helped make room for all the forecast data on the tiny LCD. If you are running this on a PC, it’s not necessary.
For the smoothest updates, I have found it ideal to run the script under ‘watch’, as so:
watch ./weather.sh
I tired doing a ‘while true; do… clear… done’ loop, but the refresh rate was too low and the updates were not smooth.
Here is the script:
UPDATE : This has moved to github, here.
Last updated: 11-21-2015