Untitled
Anonymous
C++
10/16/2026 4:03 PM
533 B
11
Indexable
Never
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#define TFT_CS -1
#define TFT_RST 4
#define TFT_DC 2
#define TFT_MOSI 11
#define TFT_SCLK 13
Adafruit_ST7789 tft(TFT_CS, TFT_DC, TFT_RST);
void setup() {
SPI.begin();
// SPI Mode 3
tft.init(240, 240, SPI_MODE3);
tft.setRotation(1);
tft.fillScreen(ST77XX_BLACK);
tft.setTextColor(ST77XX_CYAN);
tft.setTextSize(3);
tft.setCursor(35, 90);
tft.print("Hello");
tft.setCursor(10, 140);
tft.print("IoTNestBD");
}
void loop() {
}
Editor is loading...
Leave a Comment