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

LCD Display TFT 1.3inch ST7789

LCD-display TFT 1.3inch ST7789 240x240 pixels, 3.3V, SPI, RGB

Breedte: 28.5 mm

Pinout — LCD Display TFT 1.3inch ST7789

Pin Signaal Beschrijving
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

Voorbeeld-aansluitschema — LCD Display TFT 1.3inch ST7789

Van Naar Draad
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

Voorbeeld-Arduinocode — LCD Display TFT 1.3inch ST7789

Dit voorbeeld is geschreven en compile-gecheckt voor de arduino-uno. Codey Online past het voor je aan naar elk ander ondersteund board.

#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.
}

Vergelijkbare componenten

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

Bouw je Arduino- of ESP32-project met AI

Beschrijf wat je wilt bouwen. Codey Online schrijft de code, tekent het aansluitschema, compileert het en flasht je board rechtstreeks vanuit de browser.

Gratis starten