How to debug missing touch input on a new board?

Great library folks, thanks!

I’m porting to a new board with an ESP32S3 and an HX8357D and XPT2046.

Display works, but I’m having trouble getting touch working (details below).

I can see touch happening in the my_touchpad_read callback method, but LVGL doesn’t respond.

I’m using a modified version of lvgl/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino with TFT_eSPI and have calibrated the screen using that library.

I’ve tried on both HEAD of master and v8.3.3 of LVGL and HEAD and 2.4.72 of TFT_eSPI. I’ve found around 5 similar posts here, but none that suggests something that I haven’t yet tried.

Any ideas? Thanks!


Touch is registered via TFT_eSPI but doesn’t seem to reach the in_dev driver

What MCU/Processor/Board and compiler are you using?

ESP32S3 / PlatformIO core.

What LVGL version are you using?

Tried both HEAD and v8.3.3

What do you want to achieve?

Get LVGL to respond to touchscreen events

What have you tried so far?

Verified that touch events are reaching the indev_drv read_cb callback method which is passing on the data correctly. Verified calibration of the TS. Tried both HEAD and latest stable of the libraries. Doubled LV_MEM_SIZE.

Code to reproduce

Screenshot and/or video

The display correctly shows the lv_demo_widgets demo.

I think you need a transform process from touch position to screen position.
Because the hardware may send you a big value of x/y, which exceeds your screen width/height.
Note that, the (0,0) maybe not at the left top corner of your screen.

Debug your my_touchpad_read, log the x/y value when you touch.
You can find out what happened.

1 Like

Thanks, that was the clue that I needed! :slight_smile: