• Hallo! Ich habe mir bei az-delivery folgendes TFT-Display bestellt: [1,8 Zoll TFT Display SPI] (https://www.az-delivery.de/collections/displays/products/1-8-zoll-spi-tft-display)
    Library angepasst(Displaytreiber), Angeschlossen, Beispielprogramm drauf. Noch alles gut
    Als das Programm dann aber gestartet ist sah das Beispiel was auf dem Display angezeigt wurde richtig hässlich aus. Es war viel zu hell, es flackerte.
    Im Internet konnte ich nichts finden deswegen hoffe ich ihr könnt mir helfen
    LG Max aka Renax(auf Discord)


  • 💫 Suche einen Hellseher, der Programmcodes und Schaltpläne voraussagen kann. 💫

    Ich verstehe die Frage nicht, passt vielleicht besser in Diskussionen, dann könnten wir immerhin abstimmen und demokratisch entscheiden wo das Problem liegen könnte.


  • Ja, tut mir leid 😕
    Code:

    /*  
     Test the tft.print() viz the libraries embedded write() function
    
     This sketch used font 2, 4, 7
     
     Make sure all the required fonts are loaded by editing the
     User_Setup.h file in the TFT_eSPI library folder.
    
      #########################################################################
      ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ######
      #########################################################################
     */
    
    #include <SPI.h>
    
    #include <TFT_eSPI.h> // Hardware-specific library
    
    TFT_eSPI tft = TFT_eSPI();       // Invoke custom library
    
    #define TFT_GREY 0x5AEB // New colour
    
    
    void setup(void) {
      tft.init();
      tft.setRotation(2);
    }
    
    void loop() {
      
      // Fill screen with random colour so we can see the effect of printing with and without 
      // a background colour defined
      tft.fillScreen(random(0xFFFF));
      
      // Set "cursor" at top left corner of display (0,0) and select font 2
      // (cursor will move to next line automatically during printing with 'tft.println'
      //  or stay on the line is there is room for the text with tft.print)
      tft.setCursor(0, 0, 2);
      // Set the font colour to be white with a black background, set text size multiplier to 1
      tft.setTextColor(TFT_WHITE,TFT_BLACK);  tft.setTextSize(1);
      // We can now plot text on screen using the "print" class
      tft.println("Hello World!");
      
      // Set the font colour to be yellow with no background, set to font 7
      tft.setTextColor(TFT_YELLOW); tft.setTextFont(7);
      tft.println(1234.56);
      
      // Set the font colour to be red with black background, set to font 4
      tft.setTextColor(TFT_RED,TFT_BLACK);    tft.setTextFont(4);
      tft.println((long)3735928559, HEX); // Should print DEADBEEF
    
      // Set the font colour to be green with black background, set to font 4
      tft.setTextColor(TFT_GREEN,TFT_BLACK);
      tft.setTextFont(4);
      tft.println("Groop");
      tft.println("I implore thee,");
    
      // Change to font 2
      tft.setTextFont(2);
      tft.println(F("my foonting turlingdromes.")); // Can store strings in FLASH to save RAM
      tft.println("And hooptiously drangle me");
      tft.println("with crinkly bindlewurdles,");
      // This next line is deliberately made too long for the display width to test
      // automatic text wrapping onto the next line
      tft.println("Or I will rend thee in the gobberwarts with my blurglecruncheon, see if I don't!");
      
      // Test some print formatting functions
      float fnumber = 123.45;
       // Set the font colour to be blue with no background, set to font 4
      tft.setTextColor(TFT_BLUE);    tft.setTextFont(4);
      tft.print("Float = "); tft.println(fnumber);           // Print floating point number
      tft.print("Binary = "); tft.println((int)fnumber, BIN); // Print as integer value in binary
      tft.print("Hexadecimal = "); tft.println((int)fnumber, HEX); // Print as integer number in Hexadecimal
      delay(10000);
    }
    

    Ich habe alles gemacht was hier stand und die Schaltung ist genauso.
    Lg


  • #########################################################################

    DON’T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY

    #########################################################################

    Hast du die Treiber angepasst für dein TFT Display?


  • so wie im tutorial vorgesehen.


  • Nimm

    
    tft.fillScreen(random(0xFFFF));
    
    

    aus dem void loop(). Und setze es in void setup()
    (der Füllt bei jedem loop Durchlauf den Bildschirm schwarz aus)

    Gruss Thomas


  • @swisssat schrieb:

    Nimm

    
    tft.fillScreen(random(0xFFFF));
    
    

    aus dem void loop(). Und setze es in void setup()
    (der Füllt bei jedem loop Durchlauf den Bildschirm schwarz aus)

    Gruss Thomas

    Hallo. Ich hab es eben versucht, jedoch hat das mein Problem nicht gelöst. Das Display flackert weiß und man sieht die einzelnen Elemente nur sehr schwach. Scheint so als wäre das Display kaputt.


  • @renax Also ich hab den Sketch jetzt bei mir auch mal getestet. Es funktioniert scheinbar wie es soll. Also bei mir flackert nicht und die Hintergrundfarbe ändert sich alle 10 Sekunden, wie im loop() auch angegeben.

    Als Verdrahtung hab ich die hier genommen:

    tft display esp8266 verdrahtung

    Ist zwar für ein NodeMCU aber das ganze ist auch mit einem ESP8266 D1 Mini 1:1 kompatibel.


    Zuerst war der Display nur weiß, also hab ich zwei Sachen in der Libary angepasst in der User_Setup.h - Datei.

    Einmal den Treiber:

    // Only define one driver, the other ones must be commented out
    //#define ILI9341_DRIVER
    #define ST7735_DRIVER      // Define additional parameters below for this display
    //#define ILI9163_DRIVER     // Define additional parameters below for this display
    //#define S6D02A1_DRIVER
    //#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
    //#define HX8357D_DRIVER
    //#define ILI9481_DRIVER
    //#define ILI9486_DRIVER
    //#define ILI9488_DRIVER     // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
    //#define ST7789_DRIVER      // Full configuration option, define additional parameters below for this display
    //#define ST7789_2_DRIVER    // Minimal configuration option, define additional parameters below for this display
    //#define R61581_DRIVER
    //#define RM68140_DRIVER
    //#define ST7796_DRIVER
    //#define SSD1963_480_DRIVER
    //#define SSD1963_800_DRIVER
    //#define SSD1963_800ALT_DRIVER
    //#define ILI9225_DRIVER
    //#define GC9A01_DRIVER
    

    und dann musste ich das Pinout noch ändern:

    // ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
    
    // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
    #define TFT_CS   PIN_D2  // Chip select control pin D8
    #define TFT_DC   PIN_D1  // Data Command control pin
    #define TFT_RST  PIN_D0  // Reset pin (could connect to NodeMCU RST, see next line)
    //#define TFT_RST  -1    // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
    

    Hab das ganze auch nochmal mit einer Library von Adafruit getetest. Da lief es auf anhieb und ohne Anpassungen ohne Probleme:

    ST7725 Library Adafruit

    Dort habe ich das Beispiel genommen:

    Datei -> Beispiele -> Adafruit_ST7735_and_ST7789_Library -> graphicstest

    Lief auch ohne Probleme. Also wenn dein Display immer noch flackert und es nicht funktioniert wie es soll, dann ist es denke ich auch wirklich kaputt. 😄

Ähnliche Themen

  • 1
  • 9
  • 1
  • 11
  • 1