3.2 inch TFT LCD Display Screen Touch Panel with ILI9341 and Arduino Mega

I followed the instructions in a HowToMechatronics demo for using a touchscreen display with an Arduino Mega. I altered the code slightly to work for the components I purchased:

  • 3.2 inch TFT LCD Display Screen Touch Panel with ILI9341
  • 3.3V TFT LCD shield for Arduino Mega
  • Arduino Mega

I have the LCD working but the touchscreen only works a third of the time or so. My only solution thus far has been to press the Arduino reset button multiple times until the touchscreen works properly. The display should be in Landscape mode. Details on the libraries used can be found in the link above. Any ideas on what to fix?

The only adjustment made to the original code was to eliminate the flappy birds portion and alter the screen objects as shown below. The code is a little long so it is attached to the post.

UTFT    myGLCD(ILI9341_16,38,39,40,41); //Parameters should be adjusted to your Display/Schield model
URTouch  myTouch( 6, 5, 4, 3, 2);

LCD_Tutorial.ino (11.9 KB)

I have exactly the same problem. Is it possible to make a loop that initialize the touch automatically and do not go further while it does'nt work?

Did you purchase exactly the components listed in that article? Or just something similar?

I've recently purchased a 3.3" TFT with Touch display on EBay ($16) and have been able to get the display and touch working once I figured out a few things about the board.

This thread has info about the board I'm using and if your's is similar I may be able to help you out some...

https://forum.arduino.cc/index.php?topic=612322.0

In my case the key to getting the Touch to work was to know that it was wired to pins A3-A0 and tell the touch library that.

Not exactly the same Sorry and I finally undertood that one welding was not good... But it works now :wink: