A clock showing the weather on a Pimoroni Galactic Unicorn
This is a slimmed down version of Raphaël Velt's script for Pimoroni's Galactic Unicorn buy from Pimoroni shop that shows a clock as well as the current weather.
It uses the Open Meteo API to retrieve the weather forecast as well as to adjust the time zone.
I felt their version was a bit to busy.
- Birds
- Scrolling updates
- Hearts
- Feels like temprature
- Formatting of code
- Brightness controls
- Sleep button
- A button to refresh time
- B button to refresh weather
- changed wifi config and location config into more common secrets.py
- Changed colours of the weather sprites
- You need at least version 1.19.18 of the Micropython firmware for the Raspberry Pi Pico W (It uses the HSV pen function from that release). Check https://github.com/pimoroni/pimoroni-pico/releases for Firmware updates
- connect.py: creates a WIFI network connection. You need to populate a file named
WIFI_CONFIG.py
. - secrets.py: This is where you put your latitude, longitude and timezone to get your local forecast & Wifi settings.
- weatherclock_assets.py: The custom fonts used for the digits, and the icons used to display weather states.
- weatherclock.py: The main source code for the weather clock. you can call this main.py if you want it to run on boot.
Link to the original and more fun version https://github.com/raphv/galactic-weather-clock