Hi All,
I have a project to get data of meeting room reservation from reserve server to display on good display 7.5 b/w/r with ESP32. I used GxGDEW075Z09 and HTTPClient library in my sketch.
Then I tried demo "GxEPD_SPI_TestExample" and it work fine. But the image in this example is static, and I want to change the image at runtime with data from server (converted into 0x format).
I tried to used HTTPClient to read data from server but it too large and crashed at runtime. This is a part of my sketch.
String ipAddr = "http://192.168.43.78";
String fileIot = "/iot/CO-101.iot";
HTTPClient http;
http.begin(ipAddr + fileIot);
int httpCode = http.GET();
if (httpCode > 0) {
if (httpCode == HTTP_CODE_OK) {
int len = http.getSize();
int buffSize = 1;
unsigned char image[61448]; //file size is 61448
WiFiClient * stream = http.getStreamPtr();
while (http.connected() && (len > 0 || len == -1)) {
size_t size = stream->available();
if (size) {
int c = stream->readBytes(buff, ((size > sizeof(buff)) ? sizeof(buff) : size)); //error here
image[countLoop++] = buff[0];
if (len > 0) {
len -= c;
}
}
delay(1);
}
display.init();
clear_screen();
Serial.println("image");
display.drawBitmap(image, sizeof(image));
}
Please suggest what I should do. Thank you.