I have 6 e-ink screens 2,13 (D) and i need to display 1 different image for each screen.
What can you advise for driving them?
If i use SPI, I think i need 6 CS pins for displays + 6 CS pins for SRAM + 1 CS pin for the SD.
but i dont how configurate the PIN SRAM on my E-paper Shield.
Is it easier to use the SPI or I2C protocol to control 6 e-papers?
I have 6 e-ink screens 2,13 (D) and i need to display 1 different image for each screen.
What can you advise for driving them?
If i use SPI, I think i need 6 CS pins for displays + 6 CS pins for SRAM + 1 CS pin for the SD.
but i dont how configurate the PIN SRAM on my E-paper Shield.
Is it easier to use the SPI or I2C protocol to control 6 e-papers?
But if someone has already made two e-papers work at the same time, I'm a taker.
I can't separate the SRAM. When I want to display image 1 on CS_1 and image 2 on CS_2, it displays both images on both PINs. I suspect that the problem comes from PROGMEM, but i'm not sure.
I have a 2.9" B/W screen working properly. I can place images and text.
Now I need to load a BMP from HTTP. I follow your GxEPD_WIFI_EXAMPLE and I'm able to load images but not completely.
This is the output of the serial monitor:
downloading file "coca8.bmp"
connecting to xxxxxxx.com
requesting URL: http://xxxxxxxxx/bmp/coca8.bmp
request sent
headers received
File size: 38968
Image Offset: 1078
Header size: 40
Bit Depth: 8
Image size: 128x296
Error: got no more after 33324 bytes read!
bytes read 33324
loaded in 848 ms
For some reason, the read bytes are not the same as the file size.
I tried with the images used on your example but same results.
The screen loads partially the image.
The function used is "drawBitmapFrom_HTTP_ToBuffer" without any changes.
There is something wrong with WiFiClient on both platforms, ESP8266 and ESP32, but slightly different.
I didn't notice if this worked correctly on earlier versions, as the chanceflurries.bmp looked ok, but I had issues with big BMPs over https:.
I will check if I find a related issue reported for the platforms, but this is difficult, as there are many open issues.
For ESP8266 I get:
downloading file "chanceflurries.bmp"
connecting to www.squix.org
requesting URL: http://www.squix.org/blog/wunderground/chanceflurries.bmp
request sent
HTTP/1.1 200 OK
headers received
File size: 30138
Image Offset: 138
Header size: 124
Bit Depth: 24
Image size: 99x100
bytes read 28938
loaded in 503 ms
Power On : 37569
update : 4108839
Power Off : 40005
For ESP32 I get:
downloading file "chanceflurries.bmp"
connecting to www.squix.org
requesting URL: http://www.squix.org/blog/wunderground/chanceflurries.bmp
request sent
HTTP/1.1 200 OK
headers received
File size: 30138
Image Offset: 138
Header size: 124
Bit Depth: 24
Image size: 99x100
Error: got no more after 29892 bytes read!
bytes read 29892
loaded in 1258 ms
Power On : 37916
update : 4108103
Power Off : 39934
bytes read should be identical to File size for valid BMP files and successful download for bitmaps that fit on the sceen.
There is nothing I can do about this in the example, and yes, this part of the code is identical for http: and https:, both try to avoid failing on client.read() by checking client.available().
thanks for the feedback. The panel is almost certainly from Good Display.
For other users: please note that this board does not have level converters like the newer boards from Waveshare, it is for 3.3V supply and 3.3V data lines, perfect for Wemos/Lolin ESP8266 or ESP32.
After a lot of testing and hundreds of "Serial.println" everywhere, now it is working!!!! All BMP are loaded properly. Tested with 1, 4, 8,1 6 and 24 bit images.
What I did was comment on the line:
if (!connection_ok || !displayclient.connected()) break;
after both for-loop for rows and columns.
I think it is not needed to check it in those points because the reading of the file is done on functions: read16, read32, skip and read where you check for the correct connection.
bytes_read += skip(rowPosition - bytes_read);
for (uint16_t row = 0; row < h; row++, rowPosition += rowSize) // for each line
{
// if (!connection_ok || !displayclient.connected()) break;
delay(1); // yield() to avoid WDT
uint32_t in_remain = rowSize;
uint32_t in_idx = 0;
uint32_t in_bytes = 0;
uint8_t in_byte = 0; // for depth <= 8
uint8_t in_bits = 0; // for depth <= 8
uint16_t color = GxEPD_WHITE;
for (uint16_t col = 0; col < w; col++) // for each pixel
{
yield();
// if (!connection_ok || !displayclient.connected()) break;
// Time to read more pixel data?
if (in_idx >= in_bytes) // ok, exact match for 24bit also (size IS multiple of 3)
{
uint32_t get = in_remain > sizeof(input_buffer) ? sizeof(input_buffer) : in_remain;
Now the serial monitor output shows (File size and bytes read are exactly the same!!):
request sent
headers received
File size: 39094
Image Offset: 1078
Header size: 40
Bit Depth: 8
Image size: 128x297
bytes read 39094
loaded in 925 ms
ok, you are on the right track. Did you read post #1333?
I don't see displayclient in my code.
Not checking for client.connected() should be ok and does help, but not checking connection_ok will let the download hang indefinite if connection is lost.