Live Regional Weather Clock
This instructables shows how to use online regional weather image to build a weather panel.
Supplies
- Waveshare ESP32-S3-Zero
- Three ST77916 1.5" round QSPI color screen
- Micro-SD / SD card slot breakout board
- Micro-SD / SD card
- Some 47 ohm 1/4 resistor
- 830 Points Breadboard
- Some 10CM Male to Male Dupont Cable
- Some U Shape Breadboard Wire
Note:
Regional Weather Information
Most city have their own observatory department responsible for monitoring and forecasting weather. For example, in Hong Kong, it is Hong Kong Observatory. You can find many regional weather monitoring information on their web site. I always view their Radar Image to see any rain nearby and the satellite image to see the cloud movement. And also weather photo is very useful to see outside status if you stay indoor and no window near you.
Ref.:
https://www.hko.gov.hk/en/wxinfo/radars/radar.htm
https://www.hko.gov.hk/en/wxinfo/intersat/satellite/sate.htm
How Does It Works?
ESP32 family dev device most have WiFi capability, so it can gather the latest information from the Internet.
- The first information requires gather is the current time, it can gather from public NTP service on the Internet.
- According to the different images interval pattern, we can download the image every 5, 6 or 10 minutes.
- The downloaded images are saved to Micro-SD / SD card
- While waiting next download interval, we can play downloaded image in sequence every few seconds.
Note:
At the beginning, only 1 downloaded image in the card, so it only display a still image. After power on 3 hours, it can display 3 hours Timelapse animation.
Software Preparation
Arduino IDE
Download and install Arduino IDE latest version if not yet:
https://www.arduino.cc/en/software
Arduino-ESP32
Follow installation steps to add Arduino-ESP32 support if not yet:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
Arduino_GFX Library
Open Arduino IDE Library Manager by selecting "Tools" menu -> "Manager Libraries...". Search "GFX for various displays" and press "install" button.
You may refer my previous instructables for more information about Arduino_GFX.
JPEGDEC
Open Arduino IDE Library Manager by selecting "Tools" menu -> "Manager Libraries...". Search "JPEGDEC" and press "install" button.
Note:
You may refer to Arduino Documentation for the details on how to install/import library to Arduino IDE.
Wire Connection
Here are the connection summary:
Note:
The resistors are optional, but it can make the connection more stable while connect multiple display in parallel.
The display BL and TE pin can leave it unconnected.
Sample Code
Please download the sample code at GitHub:
Compile & Upload
- Open WeatherPanelHKO.ino in Arduino IDE
- The first 2 lines are the WiFi station connect details, please replace with your WiFi details
- Insert Micro-SD / SD into the card slot
- Set the board parameter settings according to your dev board
- Press upload button and wait...
Ref.:
Enjoy!
Now you have a decent Weather Panel showing live weather image on your desk!
Notes on Importing Root CA Cert
This project requires download image on the web using HTTPS protocol. The download code is base on the ESP32 HTTPS client sample code. It requires prepare the web site root CA Cert first.
The sample code is set the hko.gov.hk root CA Cert for download images. If you would like to use other web site images, please follow the above video import the correct root CA Cert to the code.