Black Screen on T-Watch 2020 V1

Hello, I am a complete LVGL newbie and I am facing the following problem. I have built lv_micropython for the ESP32 port and everything works fine so far (which means I will get the REPL prompt). But when I load the following example program:

import lvgl as lv
from ili9XXX import st7789

disp = st7789(cs=5, mosi=19, clk=18, dc=27, backlight=12)

scr = lv.obj()
btn = lv.btn(scr)
btn.align_to(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
label = lv.label(btn)
label.set_text("Hello World!")
lv.scr_load(scr)
input()

nothing happens, i.e. fortunately I don’t get an error message, but the display just stays dark. I have checked the connections of the ST7789, everything is correct. Where could the error be? Thank you very much for your help.

According to the README, you need this:

import lvgl as lv
from ili9XXX import st7789

import axp202c

# init power manager, set backlight
axp = axp202c.PMU()
axp.enablePower(axp202c.AXP202_LDO2)
axp.setLDO2Voltage(2800)

# init display
disp = st7789(
    mosi=19, clk=18, cs=5, dc=27, rst=-1, backlight=12, power=-1,
    width=240, height=240, rot=st7789.INVERSE_PORTRAIT, factor=4)

Also, I can see init_gui_twatch in display_driver_utils.py but I’m not sure it’s usable with lv_micropython. (@uraich - any idea?)

1 Like

Thanks so much for your fast response. I checked this, but I got the error, that there is no module “axp202c” and it is also not displayed with:

help('modules')

But I have cloned the lv_micropython repository and built it as documented. Do you have any ideas?

Supplement: :crazy_face:Silly, I guess AXP202c of course should not be integrated with the regular lv_micropython. Okay, I will have a look and put it into the source code and try again…

It works!!! :rofl: :joy: :rofl: I have uploaded the axp202c.py file into the file system and now I got a wonderful button on my screen… Thanks a lot for this incredible framework and your fast support!!