add basic epdiy setup for lilygo t5

This commit is contained in:
arne 2025-10-03 22:31:21 +02:00
commit 2caddd2362
4 changed files with 2254 additions and 2 deletions

1
.gitignore vendored
View file

@ -2,5 +2,4 @@
build/ build/
managed_components/ managed_components/
dependencies.lock dependencies.lock
sdkconfig

View file

@ -14,6 +14,12 @@
#include "esp_littlefs.h" #include "esp_littlefs.h"
#include <dirent.h> #include <dirent.h>
// epd
//#include <epd_highlevel.h>
#include <epdiy.h>
#define WAVEFORM EPD_BUILTIN_WAVEFORM
#define WIFI_SCAN_LIST_SIZE 10 #define WIFI_SCAN_LIST_SIZE 10
#define LUA_FILE_PATH "/assets" #define LUA_FILE_PATH "/assets"
@ -164,7 +170,40 @@ void scan_wifi_networks(void) {
ESP_LOGI(TAG, "Wi-Fi scan completed."); ESP_LOGI(TAG, "Wi-Fi scan completed.");
} }
EpdiyHighlevelState hl;
uint8_t* fb;
void app_main(void) { void app_main(void) {
epd_init(&epd_board_lilygo_t5_47, &ED097TC2, EPD_LUT_64K);
// epd_set_vcom(1560);
hl = epd_hl_init(WAVEFORM);
epd_set_rotation(EPD_ROT_LANDSCAPE);
fb = epd_hl_get_framebuffer(&hl);
epd_clear();
// Default orientation is EPD_ROT_LANDSCAPE
printf(
"Dimensions after rotation, width: %d height: %d\n\n",
epd_rotated_display_width(),
epd_rotated_display_height()
);
// draw a black rectangle
EpdRect some_rect = {
.x = 100,
.y = 100,
.width = 200,
.height = 100
};
epd_fill_rect(some_rect, 0x0, fb);
// finally, update the display!
int temperature = 25;
epd_poweron();
epd_hl_update_screen(&hl, MODE_GC16, temperature);
epd_poweroff();
// Initialize and mount the filesystem // Initialize and mount the filesystem
init_filesystem(); init_filesystem();

View file

@ -2,6 +2,9 @@
dependencies: dependencies:
georgik/lua: "==5.4.7" georgik/lua: "==5.4.7"
joltwallet/littlefs: "==1.14.8" joltwallet/littlefs: "==1.14.8"
epdiy:
path: .
git: ssh://git@github.com/vroland/epdiy
## Required IDF version ## Required IDF version
idf: idf:

2211
sdkconfig Normal file

File diff suppressed because it is too large Load diff