1.54" display with esp32 c3 Supermini

Anonymous
C++
11/15/2026 1:56 AM
487 B
17
Indexable
Never
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>

#define TFT_CS    5
#define TFT_DC    2
#define TFT_RST   4
#define TFT_SCLK  9
#define TFT_MOSI  8

Adafruit_ST7789 tft(TFT_CS, TFT_DC, TFT_RST);

void setup()
{
  SPI.begin(TFT_SCLK, -1, TFT_MOSI, TFT_CS);

  tft.init(240, 240);

  tft.setRotation(2);
  tft.fillScreen(ST77XX_BLACK);

  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(3);

  tft.setCursor(25, 110);
  tft.print("IoTNestBD");
}

void loop()
{
}
Editor is loading...
Leave a Comment