Here is a clock UI, based on WT-SC01-PLUS, which has ESP32S3 chip.
- A Clock (Time from internet)
- A Timer (For kid's homework)
- A car brand slider (read from SD card, just for fun)
- adjust background light (At 22:10 gets lower brightness, and turns more bright at 7:00 everyday)
- A weather (NOT finished, 2 weeks later, pherhaps...)
- Arduino Framework
- VS code with PlatformIO
- A ESP32S3 chip 2M psram
- A TF card
- Squareline
- wifi connected internet
WT-SC01-PLUS (aka.ZX3D50CE02S-USRC-4832 in China)
I have modified the Squareline example Futuristic_Ebike, the ordinary like this:
I re-use the background and sliders pictures, fonts and etc., because it's hard to me.
The new one like this:
BTW, Squareline is amazing, that can make UI so easily.
-
This program is composed by VSCode with PlatformIO. Check the
platformio.ini
to fit your env. -
Squareline source is in the
SquareLineProjects
folder, if you want to modify UI, import the folder to Squareline. -
SD card root files are in the
SDCardFiles
folder. Copy all files to SD root. -
Rest of these are C/C++ sources.
-
modify some code in
lv_fs_fatfs.c
, which is in LVGL library:static void *fs_dir_open(lv_fs_drv_t *drv, const char *path) { LV_UNUSED(drv); FF_DIR *d = lv_mem_alloc(sizeof(FF_DIR)); if (d == NULL) return NULL; FRESULT res = f_opendir(d, path); if (res != FR_OK) { lv_mem_free(d); d = NULL; } return d; }
-
Put your wifi name and password in
main.h
// insert your wifi name const char *ssid = ""; // insert your wifi password const char *password = "";
Enjoy it.