Codey OnlineLibreria di componenti Arduino ed ESP32 › LCD Display TFT 1.3inch ST7789
LCD Display TFT 1.3inch ST7789
Display

LCD Display TFT 1.3inch ST7789

Display LCD TFT 1,3 pollici ST7789, 240x240 pixel, 3,3 V, SPI, RGB

Larghezza: 28.5 mm

Pinout — LCD Display TFT 1.3inch ST7789

Pin Segnale Descrizione
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

Schema di cablaggio di esempio — LCD Display TFT 1.3inch ST7789

Da A Filo
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

Codice Arduino di esempio — LCD Display TFT 1.3inch ST7789

Questo esempio è stato scritto e verificato in compilazione per arduino-uno. Codey Online lo adatta a qualsiasi altra scheda supportata.

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

Componenti correlati

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

Crea il tuo progetto Arduino o ESP32 con l'AI

Descrivi cosa vuoi realizzare. Codey Online scrive il codice, disegna lo schema di collegamento, lo compila e programma la tua scheda direttamente dal browser.

Inizia gratis