The Weather Word program is designed to fetch weather forecast data from an API in 15 minute intervals, parse the data into temperature, wind speed, and weather condition arrays, and then light specific sets of LED's that represent words in the LED matrix.

In order for the API to work, you will need to obtain an API key from the WeatherUnderground website (available here). This key will be entered into the apiboot.txt file at a later step.

From the Raspberry Pi terminal, execute the following command to download and install the needed apiboot.txt and weather_word.py program files.

git clone https://github.com/aughtnaughtzero/weather_word.g...

You will now need to edit the apiboot.txt file to 1) add your API key, 2) choose (uncomment) one of the API query options, and 3) choose 'english' (degrees F) or 'metric' (degrees C).

Executing the following command will open the apiboot.txt file in the nano text editor:

sudo nano /home/pi/weather_word/apiboot.txt

By default, the city/state query is uncommented (Miami/FL). Choose and modify any query of your liking, just be sure to comment (#) any unused query. Reference the Weather Underground documentation for more examples about the query types and how to tailor the queries to work with your specific need. When you are done editing the nano file, Ctrl-X to exit and Y to save the file.

Now, to test the installation, execute the following:

sudo python3 /home/pi/weather_word/weather_word.py

Upon execution, the program will write its first log.txt file. Though, if you open the log file now, the log file will only indicate that the program is initializing with the rainbow color sequence.

The rainbow color sequence will chase across the LED matrix for 60 seconds. The weather_word program is intended to be launched upon Raspberry Pi startup. The 60 second delay is meant to give the Pi plenty of time to boot and connect to wifi before it makes the first API call.

After approximately 60 seconds have passed, the program will make its first API call. If all goes well, the current weather conditions will be displayed on the LED matrix. Every 20 seconds, the display will cycle to 'upcoming low' and then 'upcoming high' forecasted weather conditions based on results parsed from the next 12 hours of weather data.

Opening the log.txt file will reveal the data set from the API call. The program will continue to make API calls and update the LED matrix and log.txt file every 15 minutes until the Pi is shutdown or the program is terminated (Ctrl-C from the terminal).

If the API call fails to connect or returns an error, the program will wipe the LED matrix with a red display, write the error encountered to the log.txt file, and terminate.

If the API call times out during the boot sequence, the program will wipe the LED matrix with a yellow display, write a message to the log.txt file, and attempt to connect again in 3 minutes.

For the purpose of testing the quality of the light baffles in your project, I wrote the following test program to cycle through each word in the display.

sudo python3 /home/pi/weather_word/weather_word_test.py

Each word dwells for 5 seconds and then repeats when reaching the end of the display.

When you are satisfied with your setup, the final step in the software installation is to have the Pi launch the program at startup. This is accomplished by using the following terminal command to modify the crontab.

sudo crontab -e

Scroll to the bottom of the file and add the line:

@reboot sudo python3 /home/pi/weather_word/weather_word.py

When you are done editing the file, Ctrl-X to exit and Y to save the file. Now when you shutdown and reboot your Pi, the weather_word program will launch as intended. Be patient during launch as there will be no display for the first 15 seconds or so until the crontab is executed. You can now untether the project from your keyboard, mouse, and display and place it anywhere that you would want to see the current weather and forecast at a glance!