Codey OnlineArduino- & ESP32-Komponentenbibliothek › LCD Display TFT 1.3inch ST7789
LCD Display TFT 1.3inch ST7789
Displays

LCD Display TFT 1.3inch ST7789

LCD-Display TFT 1,3 Zoll ST7789, 240x240 Pixel, 3,3V, SPI, RGB

Breite: 28.5 mm

Pinbelegung — LCD Display TFT 1.3inch ST7789

Pin Signal Beschreibung
GND ground top edge header hole, leftmost labeled GND
VCC power top edge header hole, labeled VCC
SCL SCL top edge header hole, labeled SCL
SDA SDA top edge header hole, labeled SDA
RES digital top edge header hole, labeled RES
DC digital top edge header hole, labeled DC
BLK power top edge header hole, labeled BLK

Beispielschaltplan — LCD Display TFT 1.3inch ST7789

Von Nach Kabel
board:GND x1:GND black
board:5V x1:VCC red
board:D13 x1:SCL green
board:D11 x1:SDA blue
board:D9 x1:RES yellow
board:D8 x1:DC purple
board:5V x1:BLK red

Arduino-Beispielcode — LCD Display TFT 1.3inch ST7789

Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.

#include <Adafruit_ST7789.h>
#include <SPI.h>

// This example avoids including Adafruit_GFX.h directly.
// Adafruit_ST7789 brings in the graphics library through its own header,
// which prevents duplicate-library compile issues on some Arduino setups.

#define TFT_CS   -1
#define TFT_DC   8
#define TFT_RST  9

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

void setup() {
  Serial.begin(9600);
  Serial.println("ST7789 TFT display example");

  // Initialize a common 240x240 ST7789 panel.
  tft.init(240, 240);
  tft.setRotation(0);
  tft.fillScreen(ST77XX_BLACK);

  tft.setTextWrap(false);
  tft.setTextSize(2);
  tft.setTextColor(ST77XX_WHITE);

  tft.setCursor(20, 20);
  tft.println("Hello!");

  tft.setTextColor(ST77XX_CYAN);
  tft.setCursor(20, 50);
  tft.println("ST7789 TFT");

  tft.drawRect(10, 90, 220, 120, ST77XX_YELLOW);
  tft.fillCircle(60, 150, 25, ST77XX_RED);
  tft.fillTriangle(120, 190, 160, 110, 200, 190, ST77XX_GREEN);

  Serial.println("Display initialized.");
}

void loop() {
  // Static demo.
}

Ähnliche Komponenten

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1.28" Round TFT LCD 240x240 (GC9A01, SPI)

1602 LCD DISPLAY

1602 LCD DISPLAY

1602 LCD I2C DISPLAY

1602 LCD I2C DISPLAY

8x8 RGB 64 LED Matrix 5V WS2812b

8x8 RGB 64 LED Matrix 5V WS2812b

Bau dein Arduino- oder ESP32-Projekt mit AI

Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.

Kostenlos starten