Display defekt oder Fehler im Code? GMT130-V1.0 (ST7789) an ESP32 WROOM 32

Hallo zusammen,

ich habe ein kleines Problem bei meinem Projekt und komme nicht weiter.

Ich betreibe einen "GMT130-V1.0 1.3" 240x240 TFT IPS Color Display ST7789, SPI" an einem ESP32 WROOM 32.

Der Display ist wie folgt angeschlossen:
GND -> G
VCC -> 3.3
SCK -> D18
SDA -> D23
RES -> RX2
DC - > TX2
BLK -> D22

Der Code ist von einem Projekt, was ich online gefunden habe, auf die neue Hardware angepasst.

Hier der aktuelle Code:

// === ESP32 + 240x240 TFT Layout + BMP280 ===

#include <tft_setup.h>
#include <WiFi.h>
#include <Wire.h>
#include <AHT20.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#include "time.h"
#include <Preferences.h>
#include "esp_sleep.h"
#include "TFT_eSPI.h"
#include <Adafruit_BMP280.h>

TFT_eSPI tft = TFT_eSPI();
Adafruit_BMP280 bmp;  // BMP280 Sensor

#define TOUCH_PIN 33
Preferences prefs;

// WiFi
const char* ssid = "*****";
const char* password = "*****";

// NTP
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 1 * 3600;
const int daylightOffset_sec = 0;

// AHT20
#define SDA_PIN 4
#define SCL_PIN 27
AHT20 aht20;

// TFT Colors
#define CYBER_BG      ST77XX_BLACK
#define CYBER_GREEN   0x07E0
#define CYBER_ACCENT  0x07FF
#define CYBER_LIGHT   0xFD20
#define CYBER_MIX     0x05FF
#define CYBER_BLUE    0x07FF
#define CYBER_PINK    0xF81F
#define CYBER_RED     0x001F

int prevSecond = -1;
String prevSecStr = "--";
String prevHourStr = "--";
String prevMinStr = "--";
bool pulse = false;

// ================================ WiFi + Time ================================
void connectWiFiAndSyncTime() {
  tft.fillScreen(CYBER_BG);
  tft.setTextColor(CYBER_LIGHT);
  tft.setTextSize(2);
  tft.setCursor(20, 60);
  tft.print("Connecting...");

  WiFi.begin(ssid, password);
  uint8_t retry = 0;
  while (WiFi.status() != WL_CONNECTED && retry < 20) {
    delay(300);
    tft.print(".");
    retry++;
  }

  tft.fillScreen(CYBER_BG);
  if (WiFi.status() == WL_CONNECTED) {
    tft.setCursor(20, 80);
    tft.print("");
    configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
  } else {
    tft.setTextColor(ST77XX_RED);
    tft.setCursor(20, 80);
    tft.print("WiFi FAILED!");
  }
  delay(1000);
}

// ================================ Time String ================================
String getTimeStr(char type) {
  struct tm timeinfo;
  if (!getLocalTime(&timeinfo)) return "--";
  char buf[8];
  if (type == 'H') strftime(buf, sizeof(buf), "%H", &timeinfo);
  if (type == 'M') strftime(buf, sizeof(buf), "%M", &timeinfo);
  if (type == 'S') strftime(buf, sizeof(buf), "%S", &timeinfo);
  return String(buf);
}

// ================================ BORDER ================================
void drawRedBorder() {
  tft.drawRect(0, 0, 240, 240, ST77XX_RED);  // 240x240 Rand
}

// ================================ Clock ================================
void drawClock(String hourStr, String minStr, String secStr) {
  if (hourStr != prevHourStr || minStr != prevMinStr || secStr != prevSecStr ) {

    prevHourStr = hourStr;
    prevMinStr = minStr;
    prevSecStr = secStr;

    // Bereich der Uhr säubern
    tft.fillRect(10, 10, 220, 60, CYBER_BG);

    tft.setTextColor(CYBER_LIGHT);
    tft.setTextSize(4);
    tft.setCursor(10, 15);
    tft.print(hourStr);
    tft.print(":");
    tft.print(minStr);
    tft.print(":");
    tft.print(secStr);

    drawRedBorder();
  }
}

// ================================ ENV DISPLAY ================================
void drawEnv(float temp, float hum, float pres) {

  int y = 150;
  int h = 89;    // Gesamthöhe des Feldes

  tft.fillRect(10, y, 220, h, CYBER_BG);

  tft.setTextSize(2);

  tft.setTextColor(CYBER_GREEN);
  tft.setCursor(10, y);
  tft.printf("TEMPERATURE: %.1fC", temp);

  tft.setTextColor(CYBER_PINK);
  tft.setCursor(10, y + 30);
  tft.printf("HUMIDITY: %.0f%%", hum);

  tft.setTextColor(CYBER_BLUE);
  tft.setCursor(10, y + 60);
  tft.printf("PRESSURE: %.1fhPa", pres);

  drawRedBorder();
}

// ================================ Sleep ================================
void goToSleep() {
  tft.fillScreen(ST77XX_BLACK);
  tft.setTextColor(ST77XX_GREEN);
  tft.setTextSize(2);
  tft.setCursor(40, 120);
  tft.print("Sleeping...");

  pinMode(TOUCH_PIN, INPUT_PULLDOWN);
  esp_sleep_enable_ext1_wakeup(1ULL << TOUCH_PIN, ESP_EXT1_WAKEUP_ANY_HIGH);

  delay(200);
  esp_deep_sleep_start();
}

// ================================ Setup ================================
void setup() {
  Serial.begin(115200);
  Wire.begin(SDA_PIN, SCL_PIN);

  prefs.begin("state", false);
  bool isSleeping = prefs.getBool("sleeping", false);

  tft.init();
  tft.setRotation(0);
  tft.fillScreen(CYBER_BG);

  drawRedBorder();

  if (isSleeping) {
    prefs.putBool("sleeping", false);
    tft.setCursor(20, 40);
    tft.setTextColor(CYBER_LIGHT);
    tft.setTextSize(2);
    tft.print("Woke up!");
    delay(800);
  }

  connectWiFiAndSyncTime();

  if (!aht20.begin()) {
    tft.fillScreen(CYBER_BG);
    tft.setCursor(20, 60);
    tft.setTextColor(ST77XX_RED);
    tft.setTextSize(2);
    tft.print("AHT20 ERROR!");
    delay(1500);
    return;
  }

  if (!bmp.begin(0x77)) {  // BMP280 I2C Adresse
    tft.fillScreen(CYBER_BG);
    tft.setCursor(20, 100);
    tft.setTextColor(ST77XX_RED);
    tft.setTextSize(2);
    tft.print("BMP280 ERROR!");
    delay(1500);
  }

  drawClock(getTimeStr('H'), getTimeStr('M'), getTimeStr('S'));
  drawEnv(aht20.getTemperature(), aht20.getHumidity(), bmp.readPressure() / 100.0);
}

// ================================ Loop ================================
void loop() {
  if (WiFi.status() != WL_CONNECTED) WiFi.reconnect();

  struct tm timeinfo;
  if (getLocalTime(&timeinfo)) {
    int sec = timeinfo.tm_sec;

    if (sec != prevSecond) {
      prevSecond = sec;
      drawClock(getTimeStr('H'), getTimeStr('M'), getTimeStr('S'));
      drawEnv(aht20.getTemperature(), aht20.getHumidity(), bmp.readPressure() / 100.0);
    }
  }

  if (digitalRead(TOUCH_PIN) == HIGH) {
    delay(60);
    if (digitalRead(TOUCH_PIN) == HIGH) {
      while (digitalRead(TOUCH_PIN) == HIGH) delay(10);
      goToSleep();
    }
  }
}

Und hier der Code der tft_setup.h:

// 1.3" TFT Display (GMT130 V.10), 
// no CS pin
// 240x240, ST7789
// tft_setup.h
#define ST7789_DRIVER

#define TFT_WIDTH  240
#define TFT_HEIGHT 240

#define TFT_RGB_ORDER TFT_BGR

#define TFT_CS    -1   
#define TFT_RST   16  
#define TFT_DC    17  
#define TFT_MOSI  23  // SDA // HW MOSI
#define TFT_SCLK  18  // SCL // HW SCL
#define TFT_MISO  19  // not used
#define TFT_BL    22  // LED back-light
#define TFT_BACKLIGHT_ON HIGH


#define LOAD_GLCD   
#define LOAD_FONT2  
#define LOAD_FONT4  
#define LOAD_FONT6  
#define LOAD_FONT7  
#define LOAD_FONT8  
#define LOAD_GFXFF
#define SMOOTH_FONT 

#define SPI_FREQUENCY  27000000
#define SPI_READ_FREQUENCY  20000000
#define SPI_TOUCH_FREQUENCY  2500000

#define TFT_INVERSION_OFF

Mein Problem ist folgendes:


Der Display hat oben diese schwarzen Linien, die sich bis über den Rand ziehen. Anfangs dachte ich, dass sich dort irgendwele Bereiche überlagern, aber es scheint nicht so zu sein.

Nachdem ich jetzt viele Stunden alles mögliche ausprobiert habe, vermute ich fast, dass der Display defekt ist. Oder könnt ihr im Code etwas finden, dass das Problem auslöst?

Außerdem Flackert der angezeigte Text in den Bereichen, die über tft.fillRect definiert sind. Entferne ich diese tft.fillRect, "übermalen" sich die Zahlen, die sich verändern selbst.

Hier noch ein kurzes Video:

Ich hoffe, ich habe es einigermaßen gut beschrieben. Mein Wissen zum Thema ist leider sehr begrenzt. :wink:

Viele Grüße
Christian

Willkommen im Forum.

Was ist das? :wink:Meinst User_Setup.h ;)
Und das

mach -1

Wurde versuchen mit Adafruit_ST7789.

#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#define CS -1 // Deklaration von Chip Select
#define DC 17// Deklaration von Data / Command Pin
#define RST 16 // Deklaration von RESET Pin
// Display initialisieren
Adafruit_ST7789 lcd = Adafruit_ST7789(CS, DC, RST);
void setup(void) {
 lcd.init(240, 240, SPI_MODE2);
 lcd.setRotation(1);

 delay(500);
 // Display mit einer Farbe und einem Text befüllen
 lcd.fillScreen(0x22ED);
 lcd.setCursor(20, 100);
 lcd.setTextColor(ST77XX_WHITE);
 lcd.setTextSize(3);
 lcd.print("Mein TFT");
}
void loop() {
 // leer
}

Die tft_setup.h datei befindet sich im Projektordner, neben der .INO Datei mit dem Code.

Wenn diese nicht existiert, wird die Datei tft_setup.h aus dem Pfad "C:\Users\MeinPC\Documents\Arduino\libraries\TFT_eSPI verwendet. Diese zieht sich aber über alle Projekte.

So zumindest mein aktueller Wissensstand. :wink:

Die Anleitung dazu hatte ich hier gefunden:

Das war nach zwei Tagen probieren auch der Punkt, an dem der Display überhaupt das erste mal etwas angezeigt hat.

Aktuelle Info:

Nach meinem Post hier im Forum hatte ich den Display ein paar Stunden mit weißem Hintergrund laufen (normal schwarz).

Beim Wechsel auf schwarz war das Problem in der oberen Hälfte um einiges schlimmer. Als hätte sich das weiß "eingebrannt". Was wieder dafür sprechen würde, dass der Display defekt ist?!

So was hate ich mit ST7735 bei dem muss man Farbe der Lasche von Sicherheitfolie eintragen. deshalb der Vorschlag mit Adafruit.

Danke für deine Hilfe!

Mit deinem Code bleibt der Display nur schwarz. Habe folgende Versionen getestet:

Deinen Code unverändert
Deinen Code mit #include <tft_setup.h>
Deinen Code mit #include <tft_setup.h> und lcd.init(240, 240); (ohne SPI_MODE2)

jetzt sehe das du nutzt die TFT_eSPI und bindest auch die Adafruit
Das oben muss weg
Entweder Adafruit oder TFT_eSPI!

Mein Beispiel ist für Adafruit !

Schade habe so kleines Display nicht sonst hätte dir mehr geholfen
Warum testest nicht den Beispiel aus dem Link?

 
#include "tft_setup.h"
#include"TFT_eSPI.h"

TFT_eSPI tft = TFT_eSPI();

const int cw = tft.width()/2;
const int ch = tft.height()/2;
const int s = min(cw/4,ch/4);

void setup(void) {  
  tft.init();
  tft.fillScreen(TFT_BLACK);  
  tft.setRotation(1);

  tft.setTextFont(1);
  tft.setTextSize(2);
  tft.setTextColor(TFT_WHITE, TFT_BLACK);
  tft.setTextDatum(CC_DATUM);
  tft.drawString("Makerguides", ch, cw+s);

  tft.fillCircle(ch, cw/2+s/2, s/2, TFT_RED);
  tft.fillRect(1.5*ch-s, cw/2, s, s, TFT_GREEN);
  tft.fillTriangle(ch/2, cw/2, ch/2+s, cw/2, ch/2, cw/2+s, TFT_BLUE);
}

void loop() { }

Wenn das Display funktioniert so wie es soll sage bescheid.

Das sollte funktionieren, dein Sketch wie ich sehe ist aus mehreren Quellen zusammen kopiert, hat viele Sachen was kann man ändern, verbessern.
Bin nicht der Profi, jedoch wenn es geht um Displays habe sehr viel Erfahrung.

// === ESP32 + 240x240 TFT Layout + BMP280 ===

 #include <tft_setup.h>
#include <WiFi.h>
#include <Wire.h>
#include <AHT20.h>
//#include <Adafruit_GFX.h>
//#include <Adafruit_ST7789.h>
#include <SPI.h>
#include "time.h"
#include <Preferences.h>
#include "esp_sleep.h"
#include "TFT_eSPI.h"
#include <Adafruit_BMP280.h>

TFT_eSPI tft = TFT_eSPI();
Adafruit_BMP280 bmp;  // BMP280 Sensor

//#define TOUCH_PIN 33
Preferences prefs;

// WiFi
const char* ssid = "*****";
const char* password = "*****";

// NTP
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 1 * 3600;
const int daylightOffset_sec = 0;

// AHT20
#define SDA_PIN 4
#define SCL_PIN 27
AHT20 aht20;

// TFT Colors
#define CYBER_BG      TFT_BLACK
#define CYBER_GREEN   0x07E0
#define CYBER_ACCENT  0x07FF
#define CYBER_LIGHT   0xFD20
#define CYBER_MIX     0x05FF
#define CYBER_BLUE    0x07FF
#define CYBER_PINK    0xF81F
#define CYBER_RED     0x001F

int prevSecond = -1;
String prevSecStr = "--";
String prevHourStr = "--";
String prevMinStr = "--";
bool pulse = false;

// ================================ WiFi + Time ================================
void connectWiFiAndSyncTime() {
  tft.fillScreen(CYBER_BG);
  tft.setTextColor(CYBER_LIGHT);
  tft.setTextSize(2);
  tft.setCursor(20, 60);
  tft.print("Connecting...");

  WiFi.begin(ssid, password);
  uint8_t retry = 0;
  while (WiFi.status() != WL_CONNECTED && retry < 20) {
    delay(300);
    tft.print(".");
    retry++;
  }

  tft.fillScreen(CYBER_BG);
  if (WiFi.status() == WL_CONNECTED) {
    tft.setCursor(20, 80);
    tft.print("");
    configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
  } else {
    tft.setTextColor(TFT_RED);
    tft.setCursor(20, 80);
    tft.print("WiFi FAILED!");
  }
  delay(1000);
}

// ================================ Time String ================================
String getTimeStr(char type) {
  struct tm timeinfo;
  if (!getLocalTime(&timeinfo)) return "--";
  char buf[8];
  if (type == 'H') strftime(buf, sizeof(buf), "%H", &timeinfo);
  if (type == 'M') strftime(buf, sizeof(buf), "%M", &timeinfo);
  if (type == 'S') strftime(buf, sizeof(buf), "%S", &timeinfo);
  return String(buf);
}

// ================================ BORDER ================================
void drawRedBorder() {
  tft.drawRect(0, 0, 240, 240, TFT_RED);  // 240x240 Rand
}

// ================================ Clock ================================
void drawClock(String hourStr, String minStr, String secStr) {
  if (hourStr != prevHourStr || minStr != prevMinStr || secStr != prevSecStr ) {

    prevHourStr = hourStr;
    prevMinStr = minStr;
    prevSecStr = secStr;

    // Bereich der Uhr säubern
    tft.fillRect(10, 10, 220, 60, CYBER_BG);

    tft.setTextColor(CYBER_LIGHT);
    tft.setTextSize(4);
    tft.setCursor(10, 15);
    tft.print(hourStr);
    tft.print(":");
    tft.print(minStr);
    tft.print(":");
    tft.print(secStr);

    drawRedBorder();
  }
}

// ================================ ENV DISPLAY ================================
void drawEnv(float temp, float hum, float pres) {

  int y = 150;
  int h = 89;    // Gesamthöhe des Feldes

  tft.fillRect(10, y, 220, h, CYBER_BG);

  tft.setTextSize(2);

  tft.setTextColor(CYBER_GREEN);
  tft.setCursor(10, y);
  tft.printf("TEMPERATURE: %.1fC", temp);

  tft.setTextColor(CYBER_PINK);
  tft.setCursor(10, y + 30);
  tft.printf("HUMIDITY: %.0f%%", hum);

  tft.setTextColor(CYBER_BLUE);
  tft.setCursor(10, y + 60);
  tft.printf("PRESSURE: %.1fhPa", pres);

  drawRedBorder();
}

// ================================ Sleep ================================
void goToSleep() {
  tft.fillScreen(TFT_BLACK);
  tft.setTextColor(TFT_GREEN);
  tft.setTextSize(2);
  tft.setCursor(40, 120);
  tft.print("Sleeping...");

 // pinMode(TOUCH_PIN, INPUT_PULLDOWN);
//  esp_sleep_enable_ext1_wakeup(1ULL << TOUCH_PIN, ESP_EXT1_WAKEUP_ANY_HIGH);

  delay(200);
  //esp_deep_sleep_start();
}

// ================================ Setup ================================
void setup() {
  Serial.begin(115200);
  Wire.begin(SDA_PIN, SCL_PIN);

  prefs.begin("state", false);
  bool isSleeping = prefs.getBool("sleeping", false);

  tft.init();
  tft.setRotation(0);
  tft.fillScreen(CYBER_BG);

  drawRedBorder();

  if (isSleeping) {
    prefs.putBool("sleeping", false);
    tft.setCursor(20, 40);
    tft.setTextColor(CYBER_LIGHT);
    tft.setTextSize(2);
    tft.print("Woke up!");
    delay(800);
  }

  connectWiFiAndSyncTime();

  if (!aht20.begin()) {
    tft.fillScreen(CYBER_BG);
    tft.setCursor(20, 60);
    tft.setTextColor(TFT_RED);
    tft.setTextSize(2);
    tft.print("AHT20 ERROR!");
    delay(1500);
    return;
  }

  if (!bmp.begin(0x77)) {  // BMP280 I2C Adresse
    tft.fillScreen(CYBER_BG);
    tft.setCursor(20, 100);
    tft.setTextColor(TFT_RED);
    tft.setTextSize(2);
    tft.print("BMP280 ERROR!");
    delay(1500);
  }

  drawClock(getTimeStr('H'), getTimeStr('M'), getTimeStr('S'));
  drawEnv(aht20.getTemperature(), aht20.getHumidity(), bmp.readPressure() / 100.0);
}

// ================================ Loop ================================
void loop() {
  if (WiFi.status() != WL_CONNECTED) WiFi.reconnect();

  struct tm timeinfo;
  if (getLocalTime(&timeinfo)) {
    int sec = timeinfo.tm_sec;

    if (sec != prevSecond) {
      prevSecond = sec;
      drawClock(getTimeStr('H'), getTimeStr('M'), getTimeStr('S'));
      drawEnv(aht20.getTemperature(), aht20.getHumidity(), bmp.readPressure() / 100.0);
    }
  }
  //Das Display hat kein Touch!!!
  /*  if (digitalRead(TOUCH_PIN) == HIGH) {
      delay(60);
      if (digitalRead(TOUCH_PIN) == HIGH) {
        while (digitalRead(TOUCH_PIN) == HIGH) delay(10);
        goToSleep();
      }
    }
  */
}

Das stimmt. Ich habe die letzten zwei Tage sehr viel probiert. :woozy_face:

Ich habe eben lange versucht es ohne TFT_eSPI! zum laufen zu bekommen, leider ohne Erfolg. Der Display bleibt immer schwarz.

Das habe ich gestestet und das funktioniert super.

Mit deinem letzten Code ist wieder alles beim alten. Es funktioniert, aber es sieht wieder aus wie in meinem YouTube Video ganz am Anfang.

Ich bekomme noch heute Abend einen neuen Display von Amazon geliefert. Ich werde diesen mal verlöten und dann berichten.

Dir nochmals vielen Dank für deine Hilfe! :heart:

Dan warumm nicht langsam auf dem Beispiel aufbauen?
Alles auf einmall ist zeit Verschwendung, dazu ist der Erfolg miserabel, gerade wenn der Code ist zusammen gekratzt.
Und mit vergrößern der Schrift sieht es nicht so gut aus, dafür nutz man vorhandene Schriftarten

Der neue Display ist gerade angekommen. Der Fehler auf der oberen Hälfte ist weg. Der erste Bildschirm (Neuware) war defekt!

Das Flackern ist ebenfalls verschwunden. ChatGPT hatte die Lösung:

" Das Flackern kommt nicht vom TFT selbst, sondern von deiner Art, den Bildschirm zu aktualisieren.
Genauer: bei jedem Sekundenwechsel löschst du große Bereiche des Displays (fillRect) und zeichnest den gesamten Text neu. Dadurch entsteht ein sehr kurzer „Clear-Frame“, den du als Flackern siehst."

Die Lösung:

" TFT_eSPI besitzt Sprites (= Offscreen-Buffer).
Damit zeichnest du alles im RAM, und sendest erst den fertigen Frame an das Display → kein Flackern mehr."

Sieht im Code so aus:

TFT_eSprite clk = TFT_eSprite(&tft);

void drawClock(String hourStr, String minStr, String secStr) {
  clk.createSprite(220, 60);
  clk.fillSprite(CYBER_BG);
  clk.setTextColor(CYBER_LIGHT);
  clk.setTextSize(4);
  clk.setCursor(0, 5);
  clk.printf("%s:%s:%s", hourStr.c_str(), minStr.c_str(), secStr.c_str());
  clk.pushSprite(10, 10);
  clk.deleteSprite();
}

Jetzt bin ich erstmal glücklich! :blush:

Fony, dir nochmals vielen lieben Dank für deine Hilfe!! :handshake:

Diese Idee hatte ich eben beim Duschen auch schon. Vermutlich werde ich das früher oder später so machen. Ich habe richtig Lust, mein Wissen in der Materie zu verbessern. :slightly_smiling_face:

Du must mir nicht erklären wie funktioniert TFT_eSPI :rofl:
Na ja und die KI muss noch viel lernen
Text Size macht man nicht, sieht hässlich aus

Es ging nicht drum, dir das zu erklären. Dass du viel mehr weißt als ich, ist mir klar. :grin:

Vielleicht hat jemand mal das selbe Problem wie ich und findet dann dieses Thema. Es macht ja Sinn, die Lösung hier hin zu schreiben. :wink:

Ja, KI macht einige Fehler. Kann für einen Anfänger wie mich aber sehr hilfreich sein.

Nein, beispiele analysieren, gutes c++ Buch dazu.

Warum nimmst du nicht die Farben + Schreibweise wie es in der TFT_eSPI ist? Doppelt gemoppelt ist nicht immer besser, Auszug aus TFT_eSPI.h :

/***************************************************************************************
**                         Section 6: Colour enumeration
***************************************************************************************/
// Default color definitions
#define TFT_BLACK       0x0000      /*   0,   0,   0 */
#define TFT_NAVY        0x000F      /*   0,   0, 128 */
#define TFT_DARKGREEN   0x03E0      /*   0, 128,   0 */
#define TFT_DARKCYAN    0x03EF      /*   0, 128, 128 */
#define TFT_MAROON      0x7800      /* 128,   0,   0 */
#define TFT_PURPLE      0x780F      /* 128,   0, 128 */
#define TFT_OLIVE       0x7BE0      /* 128, 128,   0 */
#define TFT_LIGHTGREY   0xD69A      /* 211, 211, 211 */
#define TFT_DARKGREY    0x7BEF      /* 128, 128, 128 */
#define TFT_BLUE        0x001F      /*   0,   0, 255 */
#define TFT_GREEN       0x07E0      /*   0, 255,   0 */
#define TFT_CYAN        0x07FF      /*   0, 255, 255 */
#define TFT_RED         0xF800      /* 255,   0,   0 */
#define TFT_MAGENTA     0xF81F      /* 255,   0, 255 */
#define TFT_YELLOW      0xFFE0      /* 255, 255,   0 */
#define TFT_WHITE       0xFFFF      /* 255, 255, 255 */
#define TFT_ORANGE      0xFDA0      /* 255, 180,   0 */
#define TFT_GREENYELLOW 0xB7E0      /* 180, 255,   0 */
#define TFT_PINK        0xFE19      /* 255, 192, 203 */ //Lighter pink, was 0xFC9F
#define TFT_BROWN       0x9A60      /* 150,  75,   0 */
#define TFT_GOLD        0xFEA0      /* 255, 215,   0 */
#define TFT_SILVER      0xC618      /* 192, 192, 192 */
#define TFT_SKYBLUE     0x867D      /* 135, 206, 235 */
#define TFT_VIOLET      0x915C      /* 180,  46, 226 */

Schau mall dir das Beispiel All_Free_Fonts_Demo aus der TFT_eSPI, und werfe das clk.setTextSize(4); weg ;)

Das bezweifel ich aber stark, da Anfänger meist nicht verstehen, was die KI da zeigt und dementsprechend Fehler nicht erkennen kann.

Also erstmal selbst lernen und mit einem guten Basiswissen die KI zur Hilfe nehmen.

Das werde ich machen, danke! :slightly_smiling_face:

Wollte euch mal zeigen wofür ich das überhaupt brauche:


Habe es nun sogar geschafft, ein kleines Bild anzeigen zu lassen. :grin:

Durch Rückenprobleme kann ich im moment nicht lange sitzen, daher wird es wohl dauern, bis das Projekt fertig ist. :smiling_face_with_tear:

3 Likes