XPT2046 Touch screen stopped working

Hi,

I am trying to build a Heat Pump controller and I am providing a TFT screen with touch.
The TFT I am using has a ILI9341 controller and XPT2046 touch controller. I am using "Adafruit_ILI9341" library and "UTouch" version 1.30.
Now everything was working fine till a couple of days ago where the touch screen started giving erronous results.
After debugging through the serial port I found out that it gives the same X,Y co-ordinates no matter where I touch on the screen.

Can someone suggest me what I can do?

I guess you can try to calibrate again and if that won't work then I'd try a new screen.

To test the touch screen load the library here.

Load the example sketch "TFT_Touch_Raw", you do not need any graphics library loaded as the sketch reports the raw touch coordinates to the serial port at 38400 baud. Nothing will appear on the TFT touch screen.

You will need to change the pin allocations at the start of the sketch to match your shield pin out before compiling and uploading.

The raw x, y coordinates sent to the serial monitor window should be in the range 0 - 4095 as they are direct readings from the 12 bit ADC in the XPT2046.

One corner of the screen should give low x,y values (typically around 300) and the diagonally opposite one high values (typically around 3800), touching the middle of the screen should give values around about 2000.

The other examples should work with your TFT but you will need the library here configured for the correct pin out of your shield (Edit User_Setup.h inside the library folder to set the pins)

Hi guys

Thanks for the help. Sorry for the late reply.

The problem was that the connections from my TFT to the arduino had become loose as I had joined them by jumpers. It's working better now that I have a proper PCB with me.