//Code By A.Tedds. //Adafruit Library Files //This sketch uses a method of drawing identical black image over the image. //Method of blanking screen instead of Fill screen. //Usage of tft.drawRect(start position 0-240,0-320,size 0-240,size 0-320, Color) #include // Core graphics library #include // Hardware-specific library #define LCD_CS A3 // Chip Select goes to Analog 3 #define LCD_CD A2 // Command/Data goes to Analog 2 #define LCD_WR A1 // LCD Write goes to Analog 1 #define LCD_RD A0 // LCD Read goes to Analog 0 #define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin //#define ILI9341_INVERTOFF 0x20 //#define ILI9341_INVERTON 0x21 //#define tft.width 320 //#define tft.height 240 // Assign human-readable names to some common 16-bit color values: #define BLACK 0xFFFF #define BLUE 0xFFE0 #define GREEN 0xF81F #define CYAN 0xF800 #define GRAY1 0x8410 #define RED 0x07FF //define BRIGHT_RED 0x???? #define GRAY2 0x4208 #define MAGENTA 0x07E0 #define YELLOW 0x001F #define WHITE 0x0000 Adafruit_ILI9341_8bit_AS tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET); void setup() { // put your setup code here, to run once: tft.reset(); delay(100); //uint16_t identifier = tft.readID(); uint16_t identifier = 0x9341; //identifier = 0x9341; tft.begin(identifier); //Need code for inversion //boolean i=1; //tft.invertDisplay(true); //true or false Makes no difference Does Not Work ! tft.fillScreen(BLACK); } void loop() { //START LOOP // put your main code here, to run repeatedly: //tft.drawRect(start position 0-240,0-320,size 0-240,size 0-320, Color) tft.drawRect(60, 100, 125, 125, BLUE); tft.drawRect(0,1,239,319, BLUE); delay(200); tft.drawRect(60, 100, 125, 125, BLACK); tft.drawRect(0,1,239,319, BLACK); //delay(500); //tft.fillScreen(BLACK); tft.drawRect(60, 100, 125, 125, RED); tft.drawRect(0,1,239,319, RED); delay(200); tft.drawRect(60, 100, 125, 125, BLACK); tft.drawRect(0,1,239,319, BLACK); //delay(500); //tft.fillScreen(BLACK); tft.drawRect(60, 100, 125, 125, GREEN); tft.drawRect(0,1,239,319, GREEN); delay(200); tft.drawRect(60, 100, 125, 125, BLACK); tft.drawRect(0,1,239,319, BLACK); //delay(500); //tft.fillScreen(BLACK); //REPEAT }