Commandé avant 14h00 un jour ouvrable = expédié le jour même 30 jours de délai de rétractation Garantie d’un an
← Retour à l’aperçu

La lecture charge la vidéo depuis YouTube.

Schéma de câblage et exemple de code

Voici comment connecter le Écran LCD TFT SPI RGB 1,3 pouce (ST7789, 3,3 V) à un Arduino UNO ou à un ESP32, avec un exemple de sketch que tu peux téléverser directement.

Démonstration d'affichage TFT ST7789 1.3 Inch

Ce projet initialise un écran TFT SPI ST7789 de 1.3-inch 240x240 avec un Arduino Uno. Le sketch affiche un texte de salutation, des formes et des graphismes colorés pour démontrer les capacités de l'écran. Connectez l'écran directement aux broches SPI de l'Arduino comme indiqué.

Schéma de câblage : Écran LCD TFT SPI RGB 1,3 pouce (ST7789, 3,3 V) sur un Arduino UNO
Schéma de câblage · Cliquez pour agrandir
Tableau de câblage : Écran LCD TFT SPI RGB 1,3 pouce (ST7789, 3,3 V) sur un Arduino UNO
Tableau de câblage · Cliquez pour agrandir
ST7789_1_3_Inch_TFT_Display_Demo.ino · compilé et testé
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : ST7789 1.3 Inch TFT Display Demo
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : LCD Display TFT 1.3inch ST7789
 *  Libraries : Adafruit ST7735 and ST7789 Library 1.11.0
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

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

#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(115200);
  Serial.println(F("ST7789 TFT Display Demo"));

  // Initialize 240x240 pixel ST7789 display
  tft.init(240, 240);
  tft.setRotation(0);
  tft.fillScreen(ST77XX_BLACK);

  // Draw greeting text
  tft.setTextWrap(false);
  tft.setTextSize(2);
  tft.setTextColor(ST77XX_WHITE);
  tft.setCursor(20, 20);
  tft.println(F("Hello!"));

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

  // Draw sample graphics
  tft.drawRect(10, 85, 220, 130, ST77XX_YELLOW);
  tft.fillCircle(60, 145, 25, ST77XX_RED);
  tft.fillTriangle(120, 185, 160, 115, 200, 185, ST77XX_GREEN);

  Serial.println(F("Display ready."));
}

void loop() {
  // Static demo
}

Bibliothèques nécessaires : Adafruit ST7735 and ST7789 Library 1.11.0

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Écran TFT 1.3-inch ST7789 avec ESP32

Ce projet initialise un écran TFT SPI 240x240 de 1.3-inch à l’aide du pilote ST7789. Il dessine des formes, affiche du texte et met à jour un compteur en direct à l’écran chaque seconde.

Schéma de câblage : Écran LCD TFT SPI RGB 1,3 pouce (ST7789, 3,3 V) sur un ESP32 DevKit V1
Schéma de câblage · Cliquez pour agrandir
Tableau de câblage : Écran LCD TFT SPI RGB 1,3 pouce (ST7789, 3,3 V) sur un ESP32 DevKit V1
Tableau de câblage · Cliquez pour agrandir
ST7789_1_3_inch_TFT_Display_with_ESP32.ino · compilé et testé
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : ST7789 1.3-inch TFT Display with ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : LCD Display TFT 1.3inch ST7789
 *  Libraries : Adafruit GFX Library 1.12.6, Adafruit ST7735 and ST7789 Library 1.11.0
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

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

#define TFT_DC    2
#define TFT_RST   4
#define TFT_CS   -1

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

int counter = 0;

void setup() {
  Serial.begin(115200);

  // Initialize 240x240 ST7789 display
  tft.init(240, 240);
  tft.setRotation(2);
  tft.fillScreen(ST77XX_BLACK);

  // Draw frame and header
  tft.drawRect(10, 10, 220, 220, ST77XX_BLUE);
  tft.setTextColor(ST77XX_WHITE);
  tft.setTextSize(2);
  tft.setCursor(35, 30);
  tft.println("ESP32 ST7789");

  tft.fillCircle(120, 160, 35, ST77XX_RED);
}

void loop() {
  // Update counter area
  tft.fillRect(40, 80, 160, 30, ST77XX_BLACK);
  tft.setTextColor(ST77XX_GREEN);
  tft.setTextSize(2);
  tft.setCursor(45, 85);
  tft.printf("Count: %d", counter++);

  delay(1000);
}

Bibliothèques nécessaires : Adafruit GFX Library 1.12.6, Adafruit ST7735 and ST7789 Library 1.11.0

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Récemment consultés

Carte de dérivation avec prise femelle USB-C

Carte de dérivation avec prise femelle USB-C

€ 0,90
Capteur Hall linéaire pour Arduino | ESP32 | ESP8266

Capteur Hall linéaire pour Arduino | ESP32 | ESP8266

€ 1,85
Kit RFID NFC PN532 avec carte S50 et porte-clés S50

Kit RFID NFC PN532 avec carte S50 et porte-clés S50

€ 6,60
Connecteur header PCB droit - 8 broches, pas de 2,54 XH2.54mm

Connecteur header PCB droit - 8 broches, pas de 2,54 XH2.54mm

€ 0,35
Batterie rechargeable 18650 3,6 V 2850 mAh 10 A

Batterie rechargeable 18650 3,6 V 2850 mAh 10 A

€ 4,99
Voir
Connecteur header PCB droit - 7 broches, pas de 2,54 XH2.54mm

Connecteur header PCB droit - 7 broches, pas de 2,54 XH2.54mm

€ 0,35
Module de pilote de moteur TB6612FNG pour Arduino

Module de pilote de moteur TB6612FNG pour Arduino

€ 3,30
Shield de pilote de moteur L293D pour Arduino

Shield de pilote de moteur L293D pour Arduino

€ 3,15
Convertisseur de niveau logique bidirectionnel I2C-UART 5V-3,3V à 2 canaux

Convertisseur de niveau logique bidirectionnel I2C-UART 5V-3,3V à 2 canaux

€ 0,95
Plaque d’essai, 3220 trous - ZY-208, avec 4 bornes

Plaque d’essai, 3220 trous - ZY-208, avec 4 bornes

€ 16,65
Kit d’extension canon à billes d’eau ACEBOTT pour voiture robot ESP32

Kit d’extension canon à billes d’eau ACEBOTT pour voiture robot ESP32

€ 59,00
Pâte thermique 1gr 0.25ml grise en seringue

Pâte thermique 1gr 0.25ml grise en seringue

€ 4,30
Station de soudage Velleman Xytronic 80W

Station de soudage Velleman Xytronic 80W

€ 99,95
Carte de charge et de protection BMS 2S pour 2 x 18650

Carte de charge et de protection BMS 2S pour 2 x 18650

€ 2,00