LED Matrix Clock with weather running on a Raspberry Pico 2 W with a WaveShare Pico-RGB-Matrix-P3-64x32 and displaying weather information from a WeatherFlow Tempest weather station. For those without a Tempest check out the Open Weather Maps driven solution Pico-RGB-Matrix-Weather-Clock
The pico while wonderful has too many memory limitations. The pico 2 W is a drop in replacement and will make everything just work.
This project requires that you use circuitpython 9.x.x.
Sign into your tempest portal to create a application token under Settings and find your stationID (in the URL after you sign up). Put the token from Data Authorizations in the settings.toml file under TEMPEST_API_TOKEN="" and enter the station under the TEMPEST_STATION=xxxxx where xxxxx is the number from tempestwx.com/station/xxxxx/
Rename settings.toml.default file to settings.toml on the Pico and adjust the following settings:
- WIFI_SSID="your ssid"
- WIFI_PASSWORD="yoursupersecretpassword"
- NTP_HOST="0.adafruit.pool.ntp.org"
- TZ_OFFSET= ie TZ_OFFSET=-5
- NTP_INTERVAL=21600 # note: 21600 = 6hr, 43200 = 12hr, 86400 = 24hr
- TEMPEST_API_TOKEN="yourDataAuthorizationToken"
- TEMPEST_STATION=0 #YourStationNumber
- UNITS="imperial" # Valid Settings: imperial (temp=f, wind=mph, pressure=inhg, precip=in, distance=mi) or metric (temp=c, wind=kph, pressure=mb, precip=cm, distance=km)
UNITS_TEMP = "f" # Valid Settings: f or c
UNITS_WIND = "mph" # Valid Settings: mph, kph, kts, mps, bft, lfm
UNITS_PRESSURE = "mb" # Valid Settings: mb, inhg, mmhg, hpa
UNITS_PRECIP = "in" # Valid Settings: mm, cm, in
UNITS_DISTANCE = "mi" # Valid Settings: km, mi
To enable in application settings you must rename the _boot.py file to boot.py and place it on your device.
With this setting enabled any changes to the in menu setting ( Buzzer/ Autodim / 12/24 hr clock / DST Adjust ) will persist when you turn the device off and turn it back on again.
Settings:
- APPLY DST - Moves time ahead by 1 hour (you must manually turn it on and off) ** Only Works with NTP enabled **
- BEEP SET - Turns the beeping for button presses on and off
- AUTODIM - When the light sensor detects its dark it will dim the display (turn the LED display off).
- 12/24 HR - Changes the clock between 12 and 24 hour display.
NOTE When boot.py is enabled the drive becomes read only for your computer, to make changes you must hold down the menu / KEY0 button (Bottom button) when you turn on the device. This setting is only read at boot and restarting will have no effect on this setting.
This project requires the use of a Raspberry pico 2 W to use the WIFI for getting information for displaying on the screen such as updated time, and eventually local weather. (api to be defined soon)
This project requires that you use circuitpython 9.x.x.
Circuit libraries are included in the ./lib/src folder, just copy the ./src folder to the Pico. Most of the libraries are located on the CircuitPython libraries page. Notes:
- The schedule library is located in the version 8.x Community Bundle.
- The IR_RX library is located on github.
Connects to a Network Time Protocol server (0.adafruit.pool.ntp.org) and sets the onboard DS3231 RTC based on the time from the NTP response.
Not implemented yetS
This project moving forward will be converting changed code to loosely meet the google python coding standard.
To ignore the code.py overriding the std lib error add the following to your .vscode.json config file.
"python.languageServer": "Pylance",
[...]
"python.analysis.diagnosticSeverityOverrides": {
"reportShadowedImports": "none"
},
Memory is on the ragged edge of the Pico W limits and as such many api requests fail do to memory allocation issues.