Help with Displaying Red Color on Waveshare 4.2inch e-Paper Module (B) with ESP32

Hello,

I am trying to display red color using the Waveshare 4.2inch e-Paper Module (B) (Black, White, Red) connected to an ESP32. I am using the following setup:

cpp

코드 복사

GxEPD2_3C<GxEPD2_420_SE0420NQ04, GxEPD2_420_SE0420NQ04::HEIGHT> display(GxEPD2_420_SE0420NQ04(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));

With this configuration, I can display black and white perfectly. However, the code seems to lack support for color. I tried modifying the code by changing the data in void GxEPD2_420_SE0420NQ04::_InitDisplay() from 0x00 to 0x0F. This allowed me to get a red display, but I am unsure how to properly structure the code to support this in a standard way.

I am currently waiting for the next update, but I wanted to check if there is any existing code that supports this. Any help or guidance would be greatly appreciated.

Thank you!

Leon

DroneBotWorkshop shows how to display red color on e-paper.

It might be a better idea to start with the GxEPD2_420c_Z21 driver class.

//#define GxEPD2_DRIVER_CLASS GxEPD2_420c_Z21 // GDEQ042Z21  400x300, UC8276, (hidden)
1 Like

Thank you! It works perfectly!
I found that using UC8276C with GxEPD2_420_SE0420NQ04 was not the correct match, and there was another suitable option.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.