1 Star 0 Fork 0

cnkoala / esp32-clock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

A Clock based on ESP32S3

Here is a clock UI, based on WT-SC01-PLUS, which has ESP32S3 chip.

图 2

What can it do

  • 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...)

What it involves

  • Arduino Framework
  • VS code with PlatformIO
  • A ESP32S3 chip 2M psram
  • A TF card
  • Squareline
  • wifi connected internet

Hardware

WT-SC01-PLUS (aka.ZX3D50CE02S-USRC-4832 in China)

UI

I have modified the Squareline example Futuristic_Ebike, the ordinary like this:

图 0

I re-use the background and sliders pictures, fonts and etc., because it's hard to me.

The new one like this:

图 0

BTW, Squareline is amazing, that can make UI so easily.

How to use

  • 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.

MIT License Copyright (c) 2023 cnkoala Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

About A LCD clock interface based on ESP32S3. Arduino frameworks with PlatformIO. 展开 收起
C 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/cnkoala/esp32-clock.git
git@gitee.com:cnkoala/esp32-clock.git
cnkoala
esp32-clock
esp32-clock
main

搜索帮助