No touch response... xpt2046 ESP32 MicroPython v1.20.0

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():

scr = lv.scr_act()

btn = lv.btn(scr)
btn.add_event(button_cb, lv.EVENT.CLICKED, None)
label = lv.label(btn)
label.set_text("CLICK Me")


What am I missing ??
cs=5 is allway 0

1 Like

Works now… don’t know what I did, but all good

Hi @SL2021-Dev
I wander which ESP32 + Display board(s) are you using? I have Esp-wrover-kit but it doesn’t have touch panel; I was planning to add externally.