The 1.3'' 240x240 SPI TFT LCD Screen - ST7789 has a 240x240 full-color TFT LCD screen format. This display, using the ST7789 IC driver, has a 1.3-inch screen size.
#include
#include
#include "ST7789_AVR.h"
// ===== PIN DEFINITIONS =====
#define TFT_DC 7
#define TFT_RST 8
#define TFT_CS -1 // ❗ NO CS
#define SCR_WD 240
#define SCR_HT 240
ST7789_AVR tft = ST7789_AVR(TFT_DC, TFT_RST, TFT_CS);
void setup() {
Serial.begin(115200);
// LCD INIT
tft.init(SCR_WD, SCR_HT);
tft.fillScreen(BLACK);
tft.setCursor(10, 10);
tft.setTextColor(WHITE);
tft.setTextSize(2);
tft.println("ST7789 OK");
delay(1000);
// Test colors
tft.fillScreen(RED);
delay(500);
tft.fillScreen(GREEN);
delay(500);
tft.fillScreen(BLUE);
delay(500);
tft.fillScreen(BLACK);
tft.setCursor(20, 100);
tft.setTextSize(2);
tft.setTextColor(YELLOW);
tft.println("WORKING");
}
void loop() {
// blank – screen remains fixed
}