Blog

Interfacing and Fixing Touch Problem on TFT LCD 2.4″ Shield - Hackster.io

Add the following snippet to your HTML:

Interfacing the shield with Arduino UNO board and fixing the touch detection and inversion problem. Resistive Touch Screen

Interfacing and Fixing Touch Problem on TFT LCD 2.4″ Shield - Hackster.io

Read up about this project on

Interfacing the shield with Arduino UNO board and fixing the touch detection and inversion problem.

         Hello, in this tutorial I planned to test different functions of the TFT LCD shield but I encountered few problems and decided to show you some solutions first, so the usual tutorial about this shield will follow up later.

This is the shield I’m using it’s 2.4″ screen, it can work with Arduino Uno, Leonardo, Duemilanove, Mega… and has a slot for SD card you can use it to store BMP pictures and display them.

You just plug it on the top of the board :D. (don’t forget the insulation tape around the usb port so it doesn’t make contact with the screen board)

            So this is where the problems began for me, first you should check for the library that will work for you, to know if a library works or not, download it and open the “graphictest” example, it should show you the different colors and shapes just like in the tutorial video, if you have a white screen you may want to change the library.

This is the one that worked for me:  Download here

Unfortunately I don’t own any other version of the shield to test with a different library.

           If it works okay, you can now try the “tftpaint” example to try your touch functions, if it works correctly congratulations, but since you came here, you probably have the touch screen problem, and it’s due to manufacturers keep changing the pins locations.

For this open the “tftpaint” example and do some modification in the line shown bellow:

After this re-upload the code of the paint to your board, and I hope the touch screen is now detected, if it works okay then congratulations otherwise continue the tutorial.

If one of your axis is inverted go to the touch screen library and open it with a proper editor.

And go to the line 159 and uncomment it

Save the library modifications and re-upload the code, if the touch function now is completely inverted do some other modifications like shown below:

Then do your adjustement until the point get drawn where you touched it and in the picture, those are the values that worked fine for me.

Remember if one of the directions is still inverted just make it (x) or (1023-x), I hope this works for you if you have the problem.

Interfacing and Fixing Touch Problem on TFT LCD 2.4″ Shield - Hackster.io

1.28 Tft Display Hackster.io, an Avnet Community © 2024