Hallo! Ich hoffe auf Eure Hilfe! Als Modellflieger möchte ich eine animierte Anzeige in meinem Jet verbauen und habe bei "Volos Projects" etwas passendes gefunden. Ich benutze ein 1,8" TFT mit St7735 Chip! Benutzt hierfür wird die TFT_eSPI Library, weil die richtig schnell ist!Zudem ist ein kleines VB Programm dabei, was mir das zerlegte Gif bzw Jpeg in ein einziges C Array zusammenfügt. Funktioniert auch hervorragend. Ist die C Datei allerdings größer als ca. 1,6Mb komtt einen Fehlermeldung:irom0.text' will not fit in region `irom0_0_seg' collect2.exe: error: ld returned 1 exit status Ich hab dann gedacht nimmste einfach ein Wemos mit 16mb und gut! Leider funktioniert das nicht! Gibt es eine extra Library für diesen Wemos? Oder muss ich einige Einstellungen ändern? Die Programme sind im Video verlinkt. Hier der Code
// Icon images are stored in tabs ^ e.g. Alert.h etc above this line
// more than one icon can be in a header file
// Arrays containing FLASH images can be created with UTFT library tool:
// (libraries\UTFT\Tools\ImageConverter565.exe)
// Convert to .c format then copy into a new tab
/*
This sketch demonstrates loading images from arrays stored in program (FLASH) memory.
Works with TFT_eSPI library here:
https://github.com/Bodmer/TFT_eSPI
This sketch does not use/need any fonts at all...
Code derived from ILI9341_due library example
Make sure all the display driver and pin comnenctions are correct by
editting 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 <TFT_eSPI.h> // Hardware-specific library
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
// Include the header files that contain the icons
#include "bella.h"
#include "radarb.h"
void setup()
{
Serial.begin(115200);
tft.begin();
tft.setRotation(1); // landscape
tft.fillScreen(TFT_BLACK);
// Swap the colour byte order when rendering
tft.setSwapBytes(true);
// Draw the icons
tft.pushImage(0, 0, bellaWidth, bellaHeight, bella);
//tft.pushImage(140, 100, alertWidth, alertHeight, alert);
//tft.pushImage(180, 100, closeWidth, closeHeight, close);
// Pause here to admire the icons!
delay(2000);
tft.fillScreen(TFT_BLACK);
}
void loop()
{
// Loop filling and clearing screen
//tft.pushImage(random(tft.width() - infoWidth), random(tft.height() - infoHeight), infoWidth, infoHeight, info);
//tft.pushImage(random(tft.width() - alertWidth), random(tft.height() - alertHeight), alertWidth, alertHeight, alert);
//tft.pushImage(random(tft.width() - closeWidth), random(tft.height() - closeHeight), alertWidth, closeHeight, closeX);
//tft.pushImage(100, 100, infoWidth, infoHeight, info);
//delay(2000);
//tft.pushImage(140, 100, alertWidth, alertHeight, alert);
//delay(2000);
//tft.pushImage(180, 100, closeWidth, closeHeight, close);
//delay(2000);
for(int i=0;i<frames;i++)
{
delay(2000);
tft.pushImage(0, 0,animation_width , animation_height, radarb[i]);
}
}
Und das Video Making animation from GIF files for TFT screen (ESP32 ,ESP8266 , Arduino) - YouTube
TFTAni.zip (1.22 MB)