A code for TFT 2"4 LCD touch screen


I bought a TFT 2"4 LCD TOUCH SCREEN SHIELD for my arduino MEGA 2560 and i ran to a code of UTFT library which i already put in the libreries folder.

I tried running the example of 240X360 demo, and nothing happened (the LCD SCREEN just glows white).

I suspect that the following part of the code is my problem:

UTFT myGLCD(ITDB32S,38,39,40,41)

what is the meaning of the numbers 38,39,40,41? i connected the LCD shield just ON the arduino where the analog ports A0 to A4 are connected to LCD_RD to LCD_RST.

if the meaning of the numbers 38 39 40 41 are ports, so i dont know what i should do, because the shield ISNT connected to those ports at all.

what do i plug to those ports? I saw the requirments that are mentioned there, but the ports 38 to 41 arnt even mentioned, help please?

tHE WEBSITE OF THE LIBRARY: UTFT - Rinky-Dink Electronics

I don't see a "240x360" demo. So I am looking at the 320x240 demo. (but since I'm missing the one you have, I must have found a different library.)

In my example, the comments very clearly state what pins to use and what those numbers mean. (Again, I'm assuming I must have found a different library since yours is missing this critical information.)

The download also included 3 PDF Documentation files (also on that page) that, again, clearly say what those numbers mean and what pins to use with a Mega.

Looks like you need to use Jumper wires when using it with a Mega, since the shield needs access to the SPI pins -- and those are in a different place on a Uno versus Mega.

Thanks, and sorry, i meant the resolution you mentioned and not the one i mentioned.

anyway, i saw the documentation but the ports 38 39 40 41 arnt mentioned there..

anyway, i saw the documentation but the ports 38 39 40 41 arnt mentioned there..

Yah, if you don't bother to look, it's hard to see it.

So, let's see. From the actual example, what's this? A mention of the pins to use...

So then I looked at the Requirements.pdf in the Documents directory, what's this? A list of the Pins to use on a Mega and where to connect them on the shield you have:

In the UTFT.pdf documentation, I searched for the cryptic word "Mega" and saw this

See what the 2nd to last point says? Here's the .h file it mentions (inside of the library's hardware/avr directory)

That comment seems to apply directly to what you're doing.

Have you actually READ and followed the directions yet?