Hi, I have waveshare ESP32 Epaper driver board along with the waveshare 7 color 5.65". I modified the WiFi example little bit, so instead of downloading few images from preset url, it instead requests random file name from my server and then downloads that image.
I am running the unmodified show bitmap http buffered function, but for some reason, the image gets downloaded/loaded thrice before actually starting to display... even though the show function is called only once
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("setup");
join_wifi(); //my custom WiFi manager function
setClock();
delay(200);
// *** special handling for Waveshare ESP32 Driver board *** //
// ********************************************************* //
#if defined(ESP32) && defined(USE_HSPI_FOR_EPD)
hspi.begin(13, 12, 14, 15); // remap hspi for EPD (swap pins)
display.epd2.selectSPI(hspi, SPISettings(4000000, MSBFIRST, SPI_MODE0));
#endif
// *** end of special handling for Waveshare ESP32 Driver board *** //
// **************************************************************** //
display.init(115200);
String soubor = request_random_file(); //sends request to my webserver
delay(3000);
showBitmapFrom_HTTP_Buffered("tobikcze.eu", "/files/einkimages/", soubor.c_str(), 0, 0);
Serial.println("GxEPD2_WiFi_Example done");
Serial.println("sleeping...");
sleep();
}
You should also post the constructor. Then we would see that the page_height is less than the height of the display (at least I believe so). Therefore, for buffered drawing, paged display is needed.
At this time in the evening that's all I provide immediately.
-jz-
well I got it reduced to just 2 downloads by manually setting the MAX_HEIGHT to 224 instead of the 218
But, I noticed that completely stops after the image gets flashed, and it doesnt continue with the code i have after the showBitmapFrom_HTTP_Buffered()...
You got a corrupted stack space. This is a known effect on ESP32, if you try to use more than 65536 for graphics buffer. You can play with build parameters for ESP32, maybe.
#define MAX_DISPLAY_BUFFER_SIZE 65536ul // e.g.
"e.g." is a bit too weak, maybe. Seems a rather hard limit to work.