Wemos D1 mini pro 16mb vollen Speicher nutzen aber wie?

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)

Das Beispiel mit walk.h funktioniert bei mir, aber wo finde ich bella.h und radarb.h?

allerdings größer als ca. 1,6Mb

Der ESP8266 kann nur 1MByte Programmspeicher adressieren.

Bilder, Webseiten usw. solltest du also nicht ins Progmem packen, sondern ins SPIFFS oder littlefs

Hallo agmue! Ich würde die Dateien gerne hochladen, leider weiß ich nicht wie!

Am besten als Anhang, eventuell als zip komprimiert.

Wobei combie ja schon schrieb, es geht nur bis 1MByte, das wird auch beim Upload im Protokoll (je nach Einstellun) so gezeigt.

Hab jetzt mal die Dateien hochgeladen(siehe oben) Na ja, Userfreundlich geht anders!

rc_rainer:
Na ja, Userfreundlich geht anders!

Mit dieser Erkenntnis bist Du nicht der Erste :frowning:

Leider hatte ich mich geirrt, denn es geht um den ESP8266 und nicht um den ESP32, den ich habe.

Mit der Einstellung "Huge App (3MB no OTA/1MB SPIFFS)" für den ESP32 sehe ich

Der Sketch verwendet 1325533 Bytes (42%) des Programmspeicherplatzes. Das Maximum sind 3145728 Bytes.
Globale Variablen verwenden 15788 Bytes (4%) des dynamischen Speichers, 311892 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes.

Erst nachdem ich das Radarbild gesehen habe, habe ich verstanden, was Du vor hast.

Leider muß ich mangels Hardware aus dem Thema aussteigen, aber es wird schon eine Lösung geben.

Danke agmue, für deine Mühe! Von deiner Idee her hab ich auch mal einen ESP32 benutzt und siehe da, es funktioniert! Manchmal muss mann Probleme halt mal umgehen!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.