Skip to content
Martin F edited this page Jun 27, 2024 · 19 revisions

Welcome to the lv_port_esp32-epaper wiki

The mission is to try LVGL with ESP32 epaper displays. We made some updates and added a parallel driver (epdiy) and in this latest update to LVGL 8 this is focused primarily in using a Kindle paperwhite1 display ED060XC3 with TMA445 touch driver (Cypress)

After pulling this repository and it's submodules:

git clone --recursive https://github.com/martinberlin/lv_port_esp32-epaper.git

Some videos to see LVGL on parallel epaper in action

Proof-of-concept VIDEO

Video of LVGL sliders controlling MESH-Lamps with ESP32

Hardware

Boards ready to drive Kindle displays ED060XC3 https://www.tindie.com/search/?q=kindle the one at half the price does not have TMA445 touch connectors. It’s easy to add a 8 pin adapter to existing GPIO headers and connect the touch though if you want to go for the first revision 1.0 of the PCB

Repository and components branches

After that make sure that this repository is on master branch and that:

components/lvgl branch: release/v7

All others should use master. Keep this main repository in develop branch only for untested /unestable tests.

NOTE: I commited in last update the right branches for the components. But just to make sure, I will leave the comment, since with latest v8 version of LVGL it won't work yet.

IMPORTANT: Update manually the components/lvgl/CMakeLists.txt

And add REQUIRES "CalEPD"

 idf_component_register(SRCS ${SOURCES}
                        INCLUDE_DIRS . src
+                       REQUIRES "CalEPD"
                        REQUIRES main)

Now if you want to use only parallel epapers, you can include just epdiy:

 idf_component_register(SRCS ${SOURCES}
                        INCLUDE_DIRS . src
+                       REQUIRES "epd_driver"
                        REQUIRES main)

Please note that this part is obsolete and needs an update. Also L58 touch from Lilygo was deprecated from the main branch and if you need it you should add it as a git submodule in components folder: https://github.com/martinberlin/FT6X36-IDF

(I call it epd_driver but of course you can link it as a submodule with epdiy or any meaningful name) Sorry but I refuse to make a fork just to add one line!

After that make sure to run: idf.py menuconfig

And select:

Component config -> E-paper driver (Both options to LILYGO 4.7 in)
Component config -> LVGL TFT/Epaper Display -> Controller model -> EPDIY_GENERIC
Component config -> Touch controller: L58 (PINS already set as default for LILYGO EPD47)

Shortcut with preselected options, copy a predefined sdkconfig from config-examples folder:

cp config-examples/parallel-1strun-sdkconfig sdkconfig

That should be all. Then there are another options to control what demo widgets you want to render. But you can experiment with those later.

Make sure the right target is selected:

idf.py set-target esp32

idf.py flash monitor

Small fix to avoid forking LVGL

DEPRECATED. No need to make this. It was necessary in LVGL 8.3

update from read_cb function

/**< Function pointer to read input device data.*/
    void (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
    // Just update it to: 
    bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data);