Dear David,
I executed diagnose_TFT_support and received this message on serial monitor:
Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt
tft.readID() finds: ID = 0xD3D3
MCUFRIEND_kbv version: 2.9.9
Probably a write-only Mega2560 Shield
Try to force ID = 0x9481
PORTRAIT is 320 x 480
Run the examples/graphictest_kbv sketch
All colours, text, directions, rotations, scrolls
should work. If there is a problem, make notes on paper
Post accurate description of problem to Forum
Or post a link to a video (or photos)
I rely on good information from remote users
I used the following code in arduino but it is not working! Please help me what should I do?
Best Regards,
Majid
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define BLUE 0x001F
#define WHITE 0xFFFF
void setup(void) {
Serial.begin(9600);
uint16_t ID = 0x9481;
tft.begin(ID);
tft.setRotation(2);
}
void loop(void) {
testText();
delay(2000);
}
unsigned long testText() {
tft.fillScreen(BLUE);
tft.setCursor(tft.width()/2, tft.height()/2);
tft.setTextColor(WHITE);
tft.setTextSize(2);
tft.println("HELLO");
}