This is yet another OpenWeather App for UNO R4 WiFi and ESP32.
Inspired by the cool screen design of OpenWeahter by Bodmer, the creator of TFT_eSPI, I migrated it for my UNO R4 WiFi.
- moononournation/Arduino_GFX v1.6.9
- ArduinoJson 7.4.3
| Package | Version |
|---|---|
| Platform / Board | Arduino UNO R4 Boards by Arduino 1.6.0 |
| NTP Client | NTPClient 3.2.1 |
| HTTP Client (experimental) | ArduinoHttpClient 0.6.1 |
| Package | Version |
|---|---|
| Board Platform | esp32 by Espressif Systems 3.3.12 |
-
Open
config.hand configure the following:Item Configuration Parameters OpenWeather API LANGUAGE,LATITUDEandLONGITUDETimezone NTP_TIMEZONE_OFFSET(UNO R4 WiFi) orNTP_TIMEZONE_STRING(ESP32) -
Create your
secrets.hfor WiFi credential and OpenWeather API key:#define SECRET_SSID "***** Your SSID *****" #define SECRET_PASS "***** Your password *****" #define API_KEY "***** your OpenWeather key *****"
-
Open
rtcntp.cppand configure nearby NTP servers:static const char *ntpServers[] = { "ntp.nict.jp", "ntp.jst.mfeed.ad.jp", "pool.ntp.org", "time.google.com", //"europe.pool.ntp.org", //"time.cloudflare.com", //"time.aws.com", };
-
Open
gfx.cppand check and modify the LCD driver IC number to suit your device://------------------------------------------------------------------------------------- // Configuration // 93410 and 77890 are for MCUFRIEND-type LCDs. //------------------------------------------------------------------------------------- #define USE_TFT_DRIVER 9341 // Select Driver : 9341[0], 7789[0], 9486, 7796 #define USE_OPERATION 2 // Init operation: type 1 (default) or type 2 (variant)
-
Open
gfx_config.hppand check and modify the GPIO pin assignment to suit your device://------------------------------------------------------------------------------------- // SPI GPIO pin assignment //------------------------------------------------------------------------------------- #if defined(ARDUINO_ARCH_RENESAS_UNO) || defined(ARDUINO_ARCH_AVR) // Arduino UNO R4 WiFi // https://github.com/arduino/ArduinoCore-renesas/blob/main/variants/UNOWIFIR4/pins_arduino.h // TFT_RST and TFT_DC should be configured based on your wiring #define TFT_RST 8 // D8 #define TFT_DC 9 // D9 #define TFT_CS 10 // CS #define TFT_MOSI MOSI // 11 #define TFT_MISO MISO // 12 #define TFT_SCLK SCK // 13 #define TFT_BL -1 // Connect directly to 3.3V #define SPI_FREQUENCY 24000000 // RA4M1: 24MHz, SPI: 12MHz #else // ESP32 // ESP32-2432S028R (CYD) // https://github.com/espressif/arduino-esp32/blob/master/variants/jczn_2432s028r/pins_arduino.h #define TFT_RST -1 #define TFT_DC 2 #define TFT_MISO 12 #define TFT_MOSI 13 #define TFT_SCLK 14 #define TFT_CS 15 #define TFT_BL 21 #define SPI_FREQUENCY 80000000 // ILI9341 for ESP32 (40MHz or 80MHz) #endif
- Fix the day of the week from 21:00 through midnight.
- Display progress on the opening splash screen.
- Make weather icons multi-colorizing.
- Make lunar phase images reverse for the Northern and Southern Hemispheres.
- Verify Daylight Saving Time by
timezonereturned from OpenWeather. - Supress debug printing to the Serial Monitor.
I would like to express my gratitude to the creators of these cool icon fonts:
- kickstandapps/WeatherIcons licensed under the SIL OPEN FONT LICENSE Version 1.1.
- erikflowers/weather-icons licensed under the SIL OPEN FONT LICENSE Version 1.1.

