I am struggling with a bug with my e-paper project. I have been banging my head against it for a few days without any signs of meaningful progress, so I am here to ask for help.
Hardware
Screen:
880×528, 7.5inch E-Ink display HAT for Raspberry Pi, red / black / white three-color
SKU: 17960
Part Number: 7.5inch HD e-Paper HAT (B)
Brand: Waveshare
Controller:
ESP8266
Description of project so far
I want my ESP8266 to naively display 880x528 black/white/red images that it downloads over wifi from my raspberry pi, which is running a web server on the LAN. I am able to successfully display 880x528 black/white/red images to my screen using my raspberry pi directly, but ultimately I want to use my ESP8266 so that I can use battery power.
Description of issue
I am not yet able to successfully display 880x528 color images with my ESP8266.
I am using GxEPD2. I started with the GxEPD2_WiFi_Example, which does most of what I want to do. I modified it to connect to my wifi, and display the example images. It runs successfully, and the images look fine. This indicates to me that WiFi is working, that my wiring is set up properly, and that the screen is functioning properly.
First issue:
With more code tweaks to make the GxEPD2_WiFi_Example pull an image from my raspberry pi instead, the first issue arises: the image is displayed as completely black. Logs indicate that the WiFi connection is successful, and that my raspberry pi is getting a request, so the connection and download is successful. It is just displaying the image that seems to be the problem.
This forum is limiting me to two links in this post since I am a new user, so I put the links in the github README instead. Check the first section there to find:
- Link to the 880x528 bmp I am trying to display
- Link to code
- Link to diff from example
- Link to picture of screen for 880x528 image
- Link to picture of screen for 200x200 image
Second issue:
With a code tweak to fix the first issue with the color (I am stumbling around in the dark here, since I am completely unfamiliar with arduino programming, bitmaps, etc, so I found this fix somewhere else on github), the second issue arises: I am able to display color images, however they are mangled with a transposition issue. The red also looks pretty dark. This is as close as I can get.
Find these links in the second section of the README:
- Link to the 880x528 bmp I am trying to display
- Link to code
- Link to diff
- Link to picture of screen for 880x528 image
- Link to picture of screen for 200x200 image
Other points of data: the bmp image displays in my browser just fine when I hit the raspberry pi web server, so that part seems to be working. I also see this log statement in the logs consistently: "Error: got no more after 464708 bytes read!", which matches the size of the bmp file.
My analysis
I have spent a lot of time trying different code changes, checking other projects, etc, but none of those other changes was able to fix the transposed image issue.
It's possible that I did not modify the WifiExample correctly to support my 3-color eink screen.
Given that the example images display just fine, I thought maybe that there could be an issue with my bmp file. I have tried with several bit depths, black and white images, 3 color palettes and 7 color palettes, different image sizes, etc. None of these fix the issue.
I thought maybe there is a memory issue on the ESP8266 with displaying a 880x528 image, which is larger than all of the example images. However, the code seems to stream the image through memory, not store it all at once. Also, the full image is ultimately being displayed, just with the transposition issue. So that makes me think memory isn't the issue.
Any pointers? Especially with the bmp file. Also, any tips for further troubleshooting? Thanks.