Codey OnlineBibliothèque de composants Arduino & ESP32 › LCD Display TFT 1.3inch ST7789
LCD Display TFT 1.3inch ST7789
Écrans

LCD Display TFT 1.3inch ST7789

Écran LCD TFT 1,3 pouce ST7789, 240x240 pixels, 3,3 V, SPI, RGB

Largeur: 28.5 mm

Brochage — LCD Display TFT 1.3inch ST7789

Broche Signal Description
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

Exemple de schéma de câblage — LCD Display TFT 1.3inch ST7789

De Vers Fil
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

Exemple de code Arduino — LCD Display TFT 1.3inch ST7789

Cet exemple a été écrit et vérifié à la compilation pour le arduino-uno. Codey Online l'adapte pour vous à toute autre carte prise en charge.

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

Composants similaires

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

Construisez votre projet Arduino ou ESP32 avec l'IA

Décrivez ce que vous voulez créer. Codey Online écrit le code, dessine le schéma de câblage, le compile et flashe votre carte directement depuis le navigateur.

Commencez gratuitement