Used master branch V9 ?
MicroPython v1.20.0-700-g841ece132-dirty on 2023-07-28; ESP32 module (spiram) with ESP32
ILI9341 initialization completed
No spi errors from xpt2046
import lvgl as lv
from ili9XXX import ili9341
from xpt2046 import xpt2046
disp = ili9341(spihost=2, miso=19, mosi=23, clk=18, cs=15, dc=13, rst=0, power=14, backlight=27, mhz=40, factor=4, hybrid=True, backlight_on=1)
touch = xpt2046(spihost=2, cs=5)
def button_cb():
print("Clicked")
scr = lv.scr_act()
btn = lv.btn(scr)
btn.center()
btn.add_event(button_cb, lv.EVENT.CLICKED, None)
label = lv.label(btn)
label.set_text("CLICK Me")
lv.scr_load(scr)
What am I missing ??
cs=5 is allway 0