Weird picture on WT-86-32-3ZW1 (ESP32-S2, Arduino)

Hi.

I’m trying to set up LVGL 8.2 on WT-86-32-3ZW1 (ESP32-S2) using the LovyanGFX graphic library and Arduino.

  • LovyanGFX library works okay, I can display demos with no issues
  • The touch panel also works okay

But when I try to run a simple demo using LVGL I see this:

At the same time, it reacts to touches and animates itself.
Ths source code is in the repo https://github.com/strange-v/WT-86-32-3ZW1_LVGL

One more weird part. Initially, I had an incorrect configuration in the platformio.ini

-D LV_CONF_INCLUDE_SIMPLE=./include/gui

And with it, I was able to see the correct picture on the screen, but it was dead (no animation, no reactions to touch). After correcting the config according to the docs

-D LV_CONF_INCLUDE_SIMPLE
-I ./include/gui

I got the result from the previous photo.

Will be glad to hear any suggestions on how to fix it.

PS
Code of the screen driver:

void IRAM_ATTR flush_pixels(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
{
    uint32_t w = (area->x2 - area->x1 + 1);
    uint32_t h = (area->y2 - area->y1 + 1);
    uint32_t len = w * h;

    lcd.startWrite();
    lcd.setAddrWindow(area->x1, area->y1, w, h);
    lcd.writePixels((uint16_t *)&color_p->full, len, true);
    lcd.endWrite();

    lv_disp_flush_ready(disp);
}

Shame on me. I’ve no idea why LV_COLOR_DEPTH was set to 8, but it should be 16… A lot of time was wasted due to this simple mistake, but at least it works now.

So here is a fully functional example of using LVGL on WT-86-32-3ZW1: https://github.com/strange-v/WT-86-32-3ZW1_LVGL
I hope it’ll be useful for someone.

PS
Time to learn how to code a fancy UI.

Try SquareLine Studio :wink:

1 Like

Thanks, I’ve already installed it.
It a bit reminds me windows forms)