# ILI9341 TFT Touch Problem

**URL:** <http://forum.squareline.io/t/ili9341-tft-touch-problem/546>\
**Category:** Uncategorized\
**Created:** [October 31, 2022, 2:12pm UTC](http://forum.squareline.io/t/ili9341-tft-touch-problem/546 "2022-10-31T14:12:42Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![chris85](http://forum.squareline.io/letter_avatar_proxy/v4/letter/c/258eb7/32.png) [@chris85](http://forum.squareline.io/u/chris85)\
**Post date:** [November 1, 2022, 9:32pm UTC](http://forum.squareline.io/t/ili9341-tft-touch-problem/546/7 "2022-11-01T21:32:47Z")

</div>

Finally got it.  
In this line:

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

```

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

```auto
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.

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

```

Greeting

---

_[View the full topic](http://forum.squareline.io/t/ili9341-tft-touch-problem/546)._
