Hello,
I'm using GxEPD2_420c_Z21 and realized there is a red border around the display, which wasn't there initially, which I didn't draw and also won't go away by clearScreen().
Then I did a test with esphome on the same display and the border went away. So I was quite sure it is somehow caused by GxEPD2.
I compared the implementation in GxEPD2_420c_Z21.cpp with the waveshare reference code and I'm quite sure this red border is caused by these lines in GxEPD2_420c_Z21::_Init_Part():
_writeCommand(0x50); // VCOM AND DATA INTERVAL SETTING
_writeData(0xf7); // border floating
(https://github.com/ZinggJM/GxEPD2/blob/master/src/epd3c/GxEPD2_420c_Z21.cpp#L394)
In the waveshare code these are only in the code for hibernating (https://github.com/waveshareteam/e-Paper/blob/master/RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_4in2b_V2.c#L175)
Once I removed these lines from GxEPD2_420c_Z21::_Init_Part(), the red border is not drawn anymore when using GxEPD2.
@ZinggJM - was there a special reason for sending 0x50 and 0xf7 in _Init_Part()? At least for me it works better without.
kind regards,
Georg