#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
#define TFT_RST 8
#define TFT_SCK 13
#define TFT_MOSI 11
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup()
{
Serial.begin(9600);
Serial.print("Hello! ILI9341 TFT TEST");
tft.begin();
Serial.print("Initialized");
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(25,55);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1.5);
tft.setTextWrap(true);
tft.print("SURIYA HONGPHAYA");
tft.setCursor(30,65);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1);
tft.setTextWrap(true);
tft.print("Country Thailand");
tft.setCursor(30,75);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1);
tft.setTextWrap(true);
tft.print("City Phetchaburi");
tft.setCursor(30,85);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1);
tft.setTextWrap(true);
tft.print("Phetchaburi");
tft.setCursor(30,95);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1);
tft.setTextWrap(true);
tft.print("District Samoplue");
tft.setCursor(30,105);
tft.setTextColor(ILI9341_WHITE,ILI9341_BLUE);
tft.setTextSize(1);
tft.setTextWrap(true);
tft.print("Home 132/34 ");
delay(5000);
}
void loop()
{
tft.invertDisplay(true);
delay(500);
tft.invertDisplay(false);
delay(500);
}