ILI9341 TFT Touch Problem

Finally got it.
In this line:

bool touched = false;//tft.getTouch( &touchX, &touchY, 600 );

is touched to false and have now replaced it like this:

bool touched = tft.getTouch( &touchX, &touchY, 600 );

Nevertheless thanks for the help.

Edit: Only the touch is offset by a few pixels when I have rotation set to 3, how can I fix this?
I calibrated it again but it has no effect.
Edit2: I swapped the width and height and now it works.

TFT_eSPI tft = TFT_eSPI(screenHeight, screenWidth); /* TFT instance */

Greeting

3 Likes