Skip to content

embedded-kiddie/ArduinoOpenWeather

Repository files navigation

ArduinoOpenWeather

What is this?

OpenWeather for UNO R4 WiFi

This is yet another OpenWeatherMap 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.

Software Requirements

Graphics library

UNO R4 WiFi

Package Version
Board Platform Arduino UNO R4 Boards by Arduino 1.5.3
NTP Client NTPClient 3.2.1
HTTP Client (optional) ArduinoHttpClient 0.6.1

ESP32

Package Version
Board Platform esp32 by Espressif Systems 3.3.8

Software Configuration

  1. Open config.h and and configure the following:

    Item Configuration Parameters
    OpenWeather API LANGUAGE, LATITUDE and LONGITUDE
    Timezone TIMEZONE_OFFSET (for UNO R4 WiFi) or TIMEZONE_STRING (for ESP32)
    Screen Rotation TFT_ROTATION (0,2: portrait / 1,3: landscape)
    SPI GPIO pins TFT_DC, TFT_MISO, TFT_MOSI, ...
  2. Create your secrets.h for WiFi credential and OpenWeather API key:

    #define SECRET_SSID "***** Your SSID *****"
    #define SECRET_PASS "***** Your password *****"
    #define API_KEY     "***** your OpenWeather key *****"
  3. Open gfx.cpp and modify the Arduino_GFX code to suit your LCD device:

    #if defined(ARDUINO_UNOR4_WIFI)
    Arduino_DataBus *bus = new Arduino_HWSPI(TFT_DC, TFT_CS);
    Arduino_GFX *tft = new Arduino_ILI9341(bus, TFT_RST);
    #else // ESP32
    Arduino_DataBus *bus = new Arduino_HWSPI(TFT_DC, TFT_CS, TFT_SCLK, TFT_MOSI, TFT_MISO);
    Arduino_GFX *tft = new Arduino_ILI9341(bus, TFT_RST);
    #endif
    
    #define SPI_FREQ    40000000  // or 80000000
  4. Experimental Feature

    Symbol Default
    USE_SECURE_CLIENT true
    USE_HTTP_CLIENT false
    DESERIALIZATION_TYPE TYPE_RAW_STREAM

ToDo List

  • Fix the day of the week from 21:00 through midnight.
  • Display progress on the opening splash screen.
  • Make weather icons multi-colorizing.
  • Verify Daylight Saving Time operation.
  • Supress debug printing to the Serial Monitor.

Acknowledgement

Icon Fonts

I would like to express my gratitude to the creators of these cool icon fonts:

About

Yet another OpenWeather App for UNO R4 WiFi and ESP32

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages