Hello! So, I tried to make a project on an Arduino Uno, using a 2.4 TFT Shield (2.4'' LCD Shield for Arduino (Red) - Optimus Digital) and libraries Adafruit GFX, TFTLCD and TouchScreen. But, the project got too big for an Uno, so I bought an Arduino Mega 2560 (Placa dezvoltare, AZ-Delivery, Mega 2560 R3, 102 x 53 x 15 mm, Compatibil Arduino - eMAG.ro). Although on the Uno the code worked without any issue(except the fact I couldn't load all of it), on the Mega the exact same code gets the white screen. Is the LCD incompatible with the Mega, or what is the problem and how can I solve it?
Update: When I check its ID, it says 0x0, so it seems the Mega doesn't even recognize it
Your link claims that the TFT controller is SPF5408 or ILI9341.
Genuine Adafruit_TFTLCD does not support SPF5408.
What controller do you actually have ?
Hint read tft.readID() on the Uno.
Genuine Adafruit_TFTLCD does not support Mcufriend shields on a MEGA2560.
Life is simpler if you install MCUFRIEND_kbv via the IDE Library Manager.
The examples will report the controller ID.
The shield should just "work out of the box" on Uno, Leo, Zero, Due, Mega, ...
Ok, sorry for late answer, I had some issues with the Uno. When I run the examples from mcufriend_kbv, it says that ID is 0x0, so something isn't alright. But, when I run the examples from Adafruit TFT, it says that the ID is 0xC0C0, so maybe it helps
You have an 0xE300 controller. This is not supported by v2.9.9-Release.
It is supported by the current Beta (master) on GitHub. You would have to delete the v2.9.9-Release directory. Then download ZIP from GitHub. Install from ZIP.
I have been meaning to issue a new Release for the last year or two !
This would be a good opportunity to get on with it !!
Then you don't have to mess around with ZIPs.
And as a suggestion when you want to improve something at the library, the setRotation is upside down comparing to Adafruit TFT. The setRotation(2) from Adafruit TFT is equivalent to setRotation(4) from mcufriend_kbv and vice-versa, and the same with 1-3. It's not a big deal, because if you change the number from setRotation is exactly the same, but maybe you wanted to know.
Or second case, they are good but the rotation was that way on Adafruit TFT because of "compatibility" with 0x8357.