Hello! I'm testing an MH-ET Live 2.9" E-paper display (BW) with ESP32-WROOM (D1 MINI). I have a very simple test code using this example: E-paper display using partial updates | Arduino Project Hub
The code differs in that I don't have a Waveshare board and so not a V2 definition but the panel should be similar. At least the type seems to match the definition of 290_T94 and printing text works after full update.
Partial update does work but there are some issues. Some characters get corrupted or rather they do not get updated properly (see attached image). Any idea what could cause this? The image is just one example and the "corrupted" character is mostly in the same position while the other characters update just fine. It's not always (but it is most often) the last character either but it always is only one of them.
Weird thing is that when I use a much smaller font (eg. u8g2_font_7x14_tr), there is no issue.
I have tested a full screen partial update and that does not solve the issue so it's not about the partial update window size.
Also in my code the header has a couple of additional definitions of which I'm not sure what is the purpose or are they actually needed or even the cause if this behaviour. I've also looked at some of the GxEPD2 examples but they're very comprehensive and I really need a simplified example to test with. I like to understand the code I'm using.
Arduino IDE and all the libraries are the latest versions. Oh and I'm mostly a hardware guy, very experienced in electronics but not so much in coding.
#include <GxEPD2_BW.h>
#include <U8g2_for_Adafruit_GFX.h>
#define EPD_SS 5
#define EPD_DC 10
#define EPD_RST 26
#define EPD_BUSY 13
#define MAX_DISPLAY_BUFFER_SIZE 800
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8))
GxEPD2_BW<GxEPD2_290_T94, MAX_HEIGHT(GxEPD2_290_T94)>
display(GxEPD2_290_T94(EPD_SS, EPD_DC, EPD_RST, EPD_BUSY)); //GxEPD2_290_T94 -> MH ET Live 2.9" B/W
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts;
void setup()
{
display.init(115200);
//For partial update test
display.setTextColor(GxEPD_BLACK);
display.firstPage();
display.setRotation(1);
u8g2Fonts.begin(display); // connect u8g2 procedures to Adafruit GFX
delay(1000);
uint16_t bg = GxEPD_WHITE;
uint16_t fg = GxEPD_BLACK;
u8g2Fonts.setForegroundColor(fg); // apply Adafruit GFX color
u8g2Fonts.setBackgroundColor(bg);
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setFont(u8g2_font_fub20_tr); // 20px font
u8g2Fonts.setCursor(20, 80);
u8g2Fonts.print("Millis: ");
}while (display.nextPage());
}
void loop() {
// For partial update test
display.setPartialWindow(115, 50, 200, 40);
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
u8g2Fonts.setCursor(120, 80);
u8g2Fonts.print(millis());
}while(display.nextPage());
delay(2000);
}