I bought the WeAct Studio eink screen I mention on the title, from AliExpress, but now I see that all the official examples in github use the arduino framework, and as long as I want to use esp-idf for my whole project, I wonder if you can give me a hand about the steps I should do to work with this e-ink model.
By the way, I develop with vsc and a project I have created with the PlatformIO addon choosing to work with the esp-idf framework.
My initial intention is to learn esp-idf instead of using the arduino fw as the 1st one is the “pro”, for serious people, you know.
I know the arduino fw also has the library GXEPD2 so I’d like an equivalent but for esp-idf.
I am looking at the driver, and I can see examples to draw text and partial refresh
Forgive my ignorance: what should I use to draw graphics, images and use fonts? Maybe a library like LVGL?
Or … would it be better to include the arduino core to my project to be able to use GxEPD2_BW?
I would like to implement it as it would be in a professional environment, and not doing a frankenstein approach caused to not having a global understanding.
The above mentioned esp32-despi_co02 repo gives you access to the bare “push this framebuffer (or partial framebuffer) onto the epaper display”. It only has one hardcoded font file and no graphic shapes function available.
To fill that gap, you can use one of various libraries.
LVGL is definitely available and integrable for ESP-IDF (see https://lvgl.io/docs/open/integration/chip_vendors/espressif/add_lvgl_to_esp32_idf_project). It has various function for user interface and graphics primitives. You could integrate with your ePaper driver as well, so that it automatically pushes the finished framebuffer onto the display. LVGL is a “big” project though, so I also expect very large code and RAM sizes. But if you want a complex UI anyway, it might be what you need.
For converting image files to displayable images, you can already use the driver as-is with the partial screen update function and converters like https://javl.github.io/image2cpp/. Just upload an image, set the output type to “Arduino core, single bitmap” and draw mode of “Horizontal - 1 bit per pixel” and you get the byte array for the image that you can put into the partial draw image function at together with the desired location and dimensions of the image. (Notes: ESP-IDF has no PROGMEM so just delete that in the output code. Also try “Swap bits in byte” if the order seems swapped.).
Thank you for all your interest you put in it, and the very detailed instructions; As long as I have an esp32 s3, I will try the first option if the ram amount is enough for my project.