Raspberry Pi Picow Galactic Unicorn Weather and Clock display – Part 2

An example of this code running. Showing the weather icon and the temprature and the time of day.

For the past day I have been working on the display code I started back in February. I have made some quality of life improvements and also made it easier to get running on your own Pimoroni Galactic Unicorn.

To recap, this code takes the weather data from Open Weather Map and turns it into a small image and takes the temperature and shows it, along with the trime on the display.

What changes have I made tp the code since last time?

  • Moved the API Key into the secrets.py file along with the Wi-Fi details
  • Streamlined the time update code so it now works better when not connected to a computer via USB
  • Ability to change the brightness using the on-board LUX + and – buttons
  • Listed the code and icons on Git-hub : https://github.com/vwillcox/GU_WeatherClock

I am planning on a few more enhancements that will make it even better. These will include

  • moving the configuration into a seperate file
  • Scheduled on and off
  • Configurable background colour
  • Background colour changes based on different inputs (more use of the onboard buttons)

Using the code

Download the code from GitHub and unzip to your machine. Then using your choice of tool, upload all the files to your board.

Edit the secrets.py file by entering your Wi-Fi details and your API key from Open Weather Map.
Save the changes to your board.
Edit the file to place your location into line 32 & 33.
Save the changes to your board.

Now you are free to reboot and it should run automatically.

Find me on Fosstodon if you have any questions: https://fosstodon.org/@talktech