I was trying to make them work with the new library from adafruit but they refuse to work but they were working with the current code on the UNO. I don't have that code anymore since it was on one of my old laptop.
After some investigation I found that the readID didn't find the LCD. I suspect that my shields are 0x9341.
By changing the readID to force return of 0x9341 I was able to make them work!
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 6 // can be a digital pin
#define XP 7 // can be a digital pin
This is just a little note to help if you have the same problem.
I was trying to make them work with the new library from adafruit but they refuse to work but they were working with the current code on the UNO. I don't have that code anymore since it was on one of my old laptop.
After some investigation I found that the readID didn't find the LCD. I suspect that my shields are 0x9341.
By changing the readID to force return of 0x9341 I was able to make them work!
uint16_t Adafruit_TFTLCD::readID(void) {
return 0x9341;
}
Also my touch screen pin out are not same.
#define YP A2 // must be an analog pin, use "An" notation! #define XM A1 // must be an analog pin, use "An" notation! #define YM 6 // can be a digital pin #define XP 7 // can be a digital pin
This is just a little note to help if you have the same problem.
Your link has some form of "iurl" instead of HTML "url". I don't know how you get an "iurl" but I can't click on it.
If I remove the extraneous "iurl=http://" wrapper I get a regular clickable link i.e.
Anyway, the link shows a regular "Mcufriend Uno Shield". These come with random controllers. Many of which are not supported by Adafruit_TFTLCD. (chip is not visible to human eye)
If you want to know which controller is actually mounted on your TFT panel, run the LCD_ID_readreg.ino example sketch from MCUFRIEND_kbv library.
Thanks for the readreg report. You have a MIPI-style controller. There is not any ID found in the usual places.
I suggest that you force some test IDs and see which one obeys every test in graphictest_kbv.ino example. i.e.
correct graphics
correct colours
correct text directions
vertical scroll directions
software scroll
inverted colours
in setup()
...
uint16_t ID = tft.readID(); //
Serial.print("ID = 0x");
Serial.println(ID, HEX);
if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//>>>>> danjperron please add this next statement <<<<<
if (ID == 0x0000) ID = 0x2053; //try 0x2053, 0xAC11, 0x9302, 0x9338, 0x9341
// ID = 0x9329; // force ID
tft.begin(ID);
}
With luck, 0x9341 gives 100% performance. But these controllers do vary.