print ID on Serial

This commit is contained in:
prenticedavid
2019-05-12 12:58:53 +01:00
parent 667c89499a
commit 210c0006ab

View File

@@ -18,7 +18,10 @@ void setup(void)
{ {
Serial.begin(9600); Serial.begin(9600);
uint16_t ID = tft.readID(); uint16_t ID = tft.readID();
if (ID == 0xD3) ID = 0x9481; Serial.println("Example: Font_simple");
Serial.print("found ID = 0x");
Serial.println(ID, HEX);
if (ID == 0xD3D3) ID = 0x9481; //force ID if write-only display
tft.begin(ID); tft.begin(ID);
tft.setRotation(0); tft.setRotation(0);
} }
@@ -63,4 +66,3 @@ void showmsgXY(int x, int y, int sz, const GFXfont *f, const char *msg)
tft.print(msg); tft.print(msg);
delay(1000); delay(1000);
} }