TFT_eSPI ILI9341 LCD + Touch doesn't work on ESP32

After carefully studying these threads:

I have the display working fine, but touchscreen will not work.
Is there some new information about this issue?

These are my settings:
TFT_eSPI ver = 2.3.4
Processor = ESP32
Frequency = 240MHz
Transactions = Yes
Interface = SPI
Display driver = 9341
Display width = 240
Display height = 320

Also hard wired to:
MOSI = GPIO 23 T_DIN
MISO = GPIO 19 T_DO
SCK = GPIO 18 T_CLK
TFT_CS = GPIO 5
TFT_DC = GPIO 2
TFT_RST = GPIO 4

TOUCH_CS = GPIO 25

Font GLCD loaded
Font 2 loaded
Font 4 loaded
Font 6 loaded
Font 7 loaded
Font 8 loaded
Smooth font enabled

Display SPI frequency = 27.00
Touch SPI frequency = 2.50

I have installed LITTLEFS with some jpeg pictures and the carousel works just fine.
But, as I said, no touchscreen. Not even the simplest of all libraries will work. I tried about any lib I could find.
I'm beginning to doubt that there is a Touch library in Bodmer's TFT_eSPI.
Any ideas are welcome.

What display?
What touch controller?
Does the display actually have the touch controller and touch film installed?
How is everything connected? - a drawing or a table would help.
What results do you get when you run Bodner’s touch test?
Is there a reason why you are not using default CS pins on your ESP32, ie GPIO 15 on the VSPI bus and GPIO 5 on the HSPI bus?

First off. Post a link to the actual display that you bought. e.g. Ebay sale page.

Second. Post a photo of your wiring. Then we can check against the #defines.

Run Bodmer's C:\Users\David Prentice\Documents\Arduino\libraries\TFT_eSPI\examples\Test and diagnostics\Test_Touch_Controller\Test_Touch_Controller.ino

copy-paste a few lines of the Serial output.

David.

I’ve run all these test’s: ~/TFT_eSPI/examples/Test and diagnostics ~/Test_Touch_Controller ~/Test_Touch_Controller.ino
and a great number others.

Output from “Test and diagnostics” is in my post #0 under " My Settings"
I’ll see that I create a photo of my wiring.

Wiring: IMG_0191 — ImgBB

Run Bodmer's C:\Users\David Prentice\Documents\Arduino\libraries\TFT_eSPI\examples\Test and diagnostics\Test_Touch_Controller\Test_Touch_Controller.ino

copy-paste a few lines of the Serial output.

This would show whether the SPI lines are connected correctly.

Looking at your photo. CS appears to be connected to T_CLK by a dark green wire. T_CS is connected to GPIO25 with a white wire.

David.

You’re quite right about about: “CS appears to be connected to T_CLK by a dark green wire”
That’s evidently wrong.
After a week of trying and testing I’ve gone blind for these things.
Thank you.

Now get following output from Test_Touch_Controller.ino
x: 203 y: 3183 z: 15
x: 0 y: 3805 z: 15
x: 0 y: 3741 z: 29
x: 0 y: 3075 z: 18
x: 308 y: 3492 z: 8
x: 0 y: 3887 z: 31
x: 321 y: 3460 z: 8
x: 0 y: 3883 z: 29
x: 289 y: 3439 z: 27
x: 64 y: 3923 z: 31
x: 0 y: 3948 z: 19
x: 107 y: 3632 z: 8
x: 0 y: 3160 z: 23
x: 169 y: 3345 z: 26
x: 0 y: 3766 z: 31
x: 0 y: 3870 z: 23
x: 0 y: 3801 z: 12
x: 688 y: 1179 z: 1796
x: 657 y: 1227 z: 1914
x: 672 y: 1220 z: 1928
x: 666 y: 1223 z: 1937
x: 669 y: 1221 z: 1931
x: 667 y: 1196 z: 1945
x: 700 y: 1226 z: 1940
x: 0 y: 3763 z: 12
x: 0 y: 3828 z: 29
x: 0 y: 3928 z: 27
x: 0 y: 3403 z: 26
x: 2895 y: 3304 z: 1616
x: 2907 y: 3291 z: 1708
x: 2903 y: 3295 z: 1685
x: 2894 y: 3288 z: 1686
x: 2895 y: 3292 z: 1678
x: 0 y: 3871 z: 23
x: 0 y: 3811 z: 12
x: 0 y: 3815 z: 12
The numbers change when I move my finger over the screen; so it seems to work now. Finaly!

Last question:
Is it absolutely necessary to wire the SPI bus to the XPT2046?
My understanding is that the TFT and the XPT2046 are internally connected to the SPI-bus.

My understanding is that the TFT and the XPT2046 are internally connected to the SPI-bus.

No, they come out on separate pins. However they do share power and GND. Power will come from the AMS1117-3.3 (I guess)

Personally, I put TFT, Touch and SD all onto the same HW SPI bus. e.g. VSPI: GPIO18, 19, 23
And enable Transactions to ensure that all SPI devices can use different speed, format, ...

You can put each SPI device onto different pins. For example, TFTLCDCyg bit-bashes XPT2046 on regular GPIO pins.
Note that you should not attempt bit-bash and HW-SPI on the same pins. It will give you grief.

Regarding wiring. Write down each wire e.g. wire-colour + each terminal.
It is good for you as a checklist to tick off each wire.
And it is good for readers that might offer "extra eyeballs".

It was sheer luck that I spotted your dark green wire.

David.

Again thanks for the extra eyes.

About: "No, they come out on separate pins. "
It would have saved me, and probably many newbee's in the future, when Bodmer mentioned this loud and clear in the introduction to his library.
Could you, would you, relay that to him please?