If you like this project, consider supporting the original creator:
- Update the
config.h
file with your own WiFi credentials, Time Zone, API key, and location data.
#ifndef CONFIG_H
#define CONFIG_H
// WiFi credentials (replace with your SSID and password)
#define WIFI_SSID "SSID"
#define WIFI_PASSWORD "PASSWORD"
#define TIME_ZONE "AST-3" // Adjust this to the desired time zone string
// weatherapi.com API key
#define API_KEY "API_KEY"
// Location for weather query
#define LOCATION "LOCATION"
#endif // CONFIG_H
- Open the folder in PlatformIO and flash it.
- Update
config.txt
with your data and copy to the root directory of your SD card (not inside any folder).
WIFI_SSID=SSID
WIFI_PASSWORD=Password
TIME_ZONE=Time Zone
API_KEY=weatherapi.com API key
LOCATION=Location
- Use the ESP Web Flasher to flash the .bin to Cardputer. Set the flash address to
0x0
/ (0
) when flashing.
This project uses NTP (Network Time Protocol) to synchronize time over the internet and adjusts the local time based on the configured time zone. The time zone is set using POSIX-style strings, allowing you to handle both standard and daylight saving time automatically.
- PST8PDT - Pacific Standard Time with Daylight Saving Time
- EST5EDT - Eastern Standard Time with Daylight Saving Time
- UTC - Coordinated Universal Time
- GMT - Greenwich Mean Time
- CET-1CEST- Central European Time with Daylight Saving Time
- IST-5:30 - Indian Standard Time (UTC+5:30)
- JST-9 - Japan Standard Time (UTC+9)
- CST6CDT - Central Standard Time with Daylight Saving Time (US)
- MST7MDT - Mountain Standard Time with Daylight Saving Time (US)
- PHT-8 - Philippine Time (UTC+8)
- SGT-8 - Singapore Time (UTC+8)
- MSK-3 - Moscow Time (UTC+3)
- GMT+4 - UAE Time (UTC+4)
- AST-3 - Arabian Standard Time (Bahrain, UTC+3)