Hello World!
I am using 2.4" TFT lcd. For all of my programs I upload I am having same problem. The display on Lcd is split or doubled.
See the attached picture.
Kindly, help.
Here is the code,
#include <SPFD5408_Adafruit_GFX.h>
#include <SPFD5408_Adafruit_TFTLCD.h>
// *** Define Pin of LCD used
#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4
// *** Define Name of Color
#define BLACK 0x0000
#define WHITE 0xFFFF
#define RED 0xF800
#define GREEN 0x07E0
#define BLUE 0x001F
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define GREY 0x2108
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
void setup() {
Serial.begin(9600);
tft.reset();
uint16_t identifier = tft.readID();
/*
if(identifier == 0x9325) {
Serial.println(PSTR("Found ILI9325 LCD driver"));
} else if(identifier == 0x9328) {
Serial.println(PSTR("Found ILI9328 LCD driver"));
} else if(identifier == 0x7575) {
Serial.println(PSTR("Found HX8347G LCD driver"));
} else {
Serial.println(PSTR("Unknown LCD driver chip: "));
Serial.println(identifier, HEX);
Serial.println(PSTR("If using the Adafruit 2.8" TFT Arduino shield, the line:"));
Serial.println(PSTR(" #define USE_ADAFRUIT_SHIELD_PINOUT"));
Serial.println(PSTR("should appear in the library header (Adafruit_TFT.h)."));
Serial.println(PSTR("If using the breakout board, it should NOT be #defined!"));
Serial.println(PSTR("Also if using the breakout, double-check that all wiring"));
Serial.println(PSTR("matches the tutorial."));
return;
} */
tft.begin(identifier);
tft.setRotation(0); // Set Rotation at 0 degress (default)
tft.fillScreen(BLACK); //Set Background Color with BLACK
tft.setCursor (0,0);
tft.setTextSize (3);
tft.setTextColor (WHITE,BLACK);
tft.print ("Hello world!");
}
void loop() {
// put your main code here, to run repeatedly:
}
This is the 2.4" TFT LCD I am using