Can't get the touch part of an an 2,4" TFT ILI9341 240x320 to work...

i have bought two of these displays:

2.4 Inch Touch Panel LCD ILI9341 240x320,

but can't get the touch part to work.

I tried both with an ESP32 and an Arduino UNO

The display itself works with another sketch, so the wiring of the SPI interface is OK.
The touch part has been wired that way:
T_DO to SDO(MISO)
T_DIN to SDI(MOSI)
T_CLK to SCK
T_CS to pin 8

I wanted to run the touchpaint example, but keep to get:

Touch Paint!
Couldn't start touchscreen controller

Is the library Adafruit_STMPE610.h the right one for that module?

Thank you.

No, you want a proper hardware SPI library like XPT2046_Touchscreen from the Library Manager.

You should find that Bodmer's TFT_eSPI library looks after the Touchscreen with its own methods. (I think)
As always, try all the examples. If something does not work, you can quote which library and which example.

David.

If you use the TFT_eSPI library with the ESP32 then there is a touch controller test sketch. This works with the XPT2046 touch controller, check what you have fitted to your TFT.

bodmer:
If you use the TFT_eSPI library with the ESP32 then there is a touch controller test sketch. This works with the XPT2046 touch controller, check what you have fitted to your TFT.

Thank you, i will need some time, currently a swarm of helicobacters took control of my body... :frowning: