#include <TFT_eSPI.h>
#include <SPI.h> // this is needed for display
// The display also uses hardware SPI, plus #9 & #10
#define TFT_CS 5
#define TFT_DC 4
#define TFT_MOSI 23
#define TFT_SCLK 18
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library with default width and height
void setup(void) {
Serial.begin (9600);
Serial.print ("ST7789 TFT Bitmap Test");
tft.begin (); // initialize a ST7789 chip
//tft.setSwapBytes (true); // swap the byte order for pushImage() - corrects endianness
tft.setRotation(1);
tft.fillScreen (TFT_BLUE);
tft.setTextColor (TFT_WHITE);
tft.print ("Thai Font ภาษาไทย");
delay(2000);
}
void loop() {
// โปรแกรมหลัก
}