Waveshare E-Paper: Waveshare example working, GxEPD library not


I have the original Waveshare e-paper (7.5" b/w) and the e-Paper driver board. This has a ESP 8266 ESP-12F on it.

I can load the original example from the waveshare homepage and I can send an image to the display. So controller and display are confiremed to work.

Now I am trying an GxEPD example and the display never updates....

So I thought the mapping might be wrong. In the Original epd.h from Waveshare I see this pin assignment

/* SPI pin definition --------------------------------------------------------*/
// SPI pin definition
#define CS_PIN 15
#define RST_PIN 5
#define DC_PIN 4
#define BUSY_PIN 16

But transfering this to the example as

GxIO_Class io(SPI, 15, 4, 5);
GxEPD_Class display(io, 5, 16);

does not seem to work.

Any pointers towards what I am doing wrong is much appreciated

Hi bobmalaria,

For a new user or a new project I would recommend to use GxEPD2 instead of GxEPD.
It is also available through Library Manager.

The 7.5" e-paper needs paged drawing with ESP8266. This is easier with GxEPD2.

Unfortunately this combination neither works with GxEPD nor with GxEPD2 currently.
With both libraries I get watchdog timeout exceptions.

Until recently I had only one 7.5" b/w panel, and this is in constant use for my sensor values, so I did not routinely do regression tests with this panel. And I don’t use the ESP8266 driver board usually.
So I don’t know why these watchdog timeouts occur again, but didn’t with my last tests.

Anyway, you should at least have seen some reaction, and you would see some output with GxEPD2.

For GxEPD:

Did you observe diagnostic output in the Serial Monitor? Diagnostic output is enabled in the examples.

Did you select the #include for the correct panel?

// select the display class to use, only one
//#include <GxGDEP015OC1/GxGDEP015OC1.h>    // 1.54" b/w
//#include <GxGDEW0154Z04/GxGDEW0154Z04.h>  // 1.54" b/w/r 200x200
//#include <GxGDEW0154Z17/GxGDEW0154Z17.h>  // 1.54" b/w/r 152x152
//#include <GxGDEW0213I5F/GxGDEW0213I5F.h>  // 2.13" b/w 104x212 flexible
//#include <GxGDE0213B1/GxGDE0213B1.h>      // 2.13" b/w
//#include <GxGDEH0213B72/GxGDEH0213B72.h>  // 2.13" b/w new panel
//#include <GxGDEH0213B73/GxGDEH0213B73.h>  // 2.13" b/w newer panel
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h>  // 2.13" b/w/r
//#include <GxGDEH029A1/GxGDEH029A1.h>      // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h>      // 2.9" b/w IL0373
//#include <GxGDEW029Z10/GxGDEW029Z10.h>    // 2.9" b/w/r
//#include <GxGDEW026T0/GxGDEW026T0.h>      // 2.6" b/w
//#include <GxGDEW027C44/GxGDEW027C44.h>    // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h>      // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h>      // 3.7" b/w
//#include <GxGDEW042T2/GxGDEW042T2.h>      // 4.2" b/w
//#include <GxGDEW042Z15/GxGDEW042Z15.h>    // 4.2" b/w/r
//#include <GxGDEW0583T7/GxGDEW0583T7.h>    // 5.83" b/w
#include <GxGDEW075T8/GxGDEW075T8.h>      // 7.5" b/w
//#include <GxGDEW075Z09/GxGDEW075Z09.h>    // 7.5" b/w/r
//#include <GxGDEW075Z08/GxGDEW075Z08.h>    // 7.5" b/w/r 800x480

Did you modify the constructor parameter at the right place?

#if defined(ESP8266)

// for SPI pin definitions see e.g.:
// C:\Users\xxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\variants\generic\common.h

//GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
//GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)
// Heltec E-Paper 1.54" b/w without RST, BUSY
//GxEPD_Class display(io, /*RST=D4*/ -1, /*BUSY=D2*/ -1); // no RST, no BUSY
GxIO_Class io(SPI, 15, 4, 5); 
GxEPD_Class display(io, 5, 16); 

#elif defined(ESP32)

For GxEPD2 you would need to uncomment just one line:

// ***** for mapping of Waveshare e-Paper ESP8266 Driver Board *****
// select one , can use full buffer size (full HEIGHT)
//GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
//GxEPD2_BW<GxEPD2_213, GxEPD2_213::HEIGHT> display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDE0213B1, phased out
//GxEPD2_BW<GxEPD2_213_B72, GxEPD2_213_B72::HEIGHT> display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B72
//GxEPD2_BW<GxEPD2_213_B73, GxEPD2_213_B73::HEIGHT> display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B73
//GxEPD2_BW<GxEPD2_213_flex, GxEPD2_213_flex::HEIGHT> display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213I5F
//GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display(GxEPD2_290(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
//GxEPD2_BW<GxEPD2_290_T5, GxEPD2_290_T5::HEIGHT> display(GxEPD2_290_T5(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW029T5
//GxEPD2_BW<GxEPD2_260, GxEPD2_260::HEIGHT> display(GxEPD2_260(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
//GxEPD2_BW<GxEPD2_270, GxEPD2_270::HEIGHT> display(GxEPD2_270(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
//GxEPD2_BW<GxEPD2_371, GxEPD2_371::HEIGHT> display(GxEPD2_371(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
//GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
// can use only half buffer size
//GxEPD2_BW < GxEPD2_583, GxEPD2_583::HEIGHT / 2 > display(GxEPD2_583(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
GxEPD2_BW < GxEPD2_750, GxEPD2_750::HEIGHT / 2 > display(GxEPD2_750(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));

You could try this to see if you get some reaction on the display and some diagnostic output.
I will try to fix the watchdog timeout issue in the next release of both libraries.


Update: both libraries work ok when used with Wemos D1 mini Pro with the 7.5" b/w e-paper.
Most likely also with other Wemos D1 mini, I use different ones randomly for tests.

Both libraries cause random watchdog exceptions when used with Waveshare e-paper ESP8266 Driver board (ESP-12F) with the 7.5" b/w e-paper. It looks like this board has a shorter watchdog timeout.
I will check this and try to adapt the libraries, but with low priority.

Note that I do not recommend this driver board, as its pin use conflicts with using processor deep sleep wakeup (GPIO16 used for BUSY, would be wakeup RST drive).


Update: GxEPD and GxEPD2 work ok with the Waveshare e-Paper ESP8266 Driver Board and 7.5" b/w e-paper panel, if the board is supplied with stable 5V.

The board has a series protection diode from 5V USB, and a series regulator for 3.3V.
The USB voltage should be about 5.2V (USB3) to get 3.3V on the VCC pin.
With my working setup (switchable USB3 HUB on USB3) I get 3.1V on the VCC pin, and the examples work ok.

Before I used a "7-PORTS USB 2.0 High Speed HUB" on USB2, which drops USB voltage to 4.2V.
With this I had 2.9V or lower on the VCC pin, and the erratic watchdog behaviour.
Most likely the 2.9V were not stable; I didn't look at it with a scope.

Another lesson learned, with zero cost but a lot of time, as all the yield()'s added didn't help.


Thank you for your library and your support.

I got the font example now working with GxEPD2.

I tried several other examples, like the first _Example one and got a bunch of "Invalid conversion from 'const char*' to 'char*' [-fpermissive] errors" while compiling.
Being to lazy to try to fix the issue I tried the next available examples

I now know that the package is working and I get can indeed communicate to the display. I'll go from there.

Thanks again

I consider it unfair to report about having got errors, but not reporting the errors.

Please copy the errors and post them in a code window, using the </> command symbol.

What warning level have you selected in preferences?

Sorry, I have very limited time to work on this right now and just wanted to get something going…

I solved the issue from the examples by


display.getTextBounds(string2char(HelloWorld), 0, 0, &tbx, &tby, &tbw, &tbh); to every display.getTextBounds

char* string2char(String command){
        char *p = const_cast<char*>(command.c_str());
        return p;

Not using this gives me the mentioned error.

Again I did not dig to deep where this is coming from. Probably a library update or an old version on my side, although I did a fresh install two weeks ago


which version of Adafruit_GFX do you use? Also report Arduino IDE version and target processor/board.

   getTextBounds(const char *string, int16_t x, int16_t y,
      int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
    getTextBounds(const __FlashStringHelper *s, int16_t x, int16_t y,
      int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
    getTextBounds(const String &str, int16_t x, int16_t y,
      int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
const char HelloWorld[] = "Hello World!";

should match to the first overloaded method.

BTW: your string2char function returns a pointer to a stale object, I believe.

Hello everyone,
I bought this waveshare 7.5 inch e-Paper(B) three-color (red, black, white) display

and this waveshare e-Paper ESP32 Board

I downloaded the waveshare demo code for the board and the display from there wiki page and upload the code to the ESP32 board and it works. In the demo code you can only send an image to the display either through bluetooth or wifi but I want to send some characters to the display using display.print(text) function.

I have tried GxEPD and GxEPD2 libraries and no success yet.
After uploading the example sketches from both libraries the E-Paper will not even blink at all.
Please I need some advice on how to send text to this display using this e-paper esp32 board

Try example GxEPD2_WS_ESP32_Driver.ino

// NOTE: this board uses "unusual" SPI pins and requires re-mapping of HW SPI to these pins in SPIClass

//       this example shows how this can be done easily
 // *** special handling for Waveshare ESP32 Driver board *** //

  // ********************************************************* //

  SPI.end(); // release standard SPI pins, e.g. SCK(18), MISO(19), MOSI(23), SS(5)

  //SPI: void begin(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);

  SPI.begin(13, 12, 14, 15); // map and init SPI pins SCK(13), MISO(12), MOSI(14), SS(15)

  // *** end of special handling for Waveshare ESP32 Driver board *** //

  // **************************************************************** //

Thanks ZinggJM for your quick reply. With that example the ePaper can now work with the ESP32 board.

I’m having issues using Waveshare 2.9" Flexible e-paper on an LOLIN D32 PRO.
I’m using the Arduino examples and I’m unsure on what definition to use as both:
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373

both don’t seem to work. My pinout is :


GxIO_Class io(SPI, /CS=5/ SS, /DC=/ 22, /RST=/ 21); //
GxEPD_Class display(io, /RST=/ 21, /BUSY=/ 4); //

Screen won’t turn on… what am I doing wrong?


welcome to the forum. Did you read General Guidance and How to use the Forum?

Complete information is essential for a good answer.

In addition to the information you provided, I need to now what connection module you use, the board that has the booster electronics to produce the panel driving voltages.

And a clickable link to you display board or panel would be helpful, too.

296×128, 2.9inch flexible E-Ink raw display panel

same as:

2.9 inch flexible 4 grayscale e ink display module e paper display buy epd display manufacture GDEW029I6F

It has the same controller as the GDEW029T5: IL0373

So I would expect you would see at least some reaction on the display.

what am I doing wrong?

You chose an e-paper panel that I don't have, and that is neither supported by GxEPD nor GxEPD2. :slight_smile:

But I don't know if this is the reason, with the information you provided.

There was at least one post that reported it doesn't work with settings for GDEW029T5.

Did you look at diagnostic output in Serial Monitor? The BUSY active times are helpful (in microseconds).

BTW: for Newbies or new projects I recommend GxEPD2.



Hello, is there an easy way to send text to an E-Paper? I've been googling around but it doesn't seem possible.

We'd like to have some as info displays, but it must be easy for someone to update say over a web interface or the like also with a permanent logo that would never change?

Thanks and hello from Zürich


It depends on what "an easy way" means for you.

You need a processor, an application program using a library, and a connection module to the e-paper panel, to be able to present a text on the e-paper.

And you would need a communication means to send the text to present to that processor.

Your application is similar to shelf label use. I think this is what these e-paper displays are mostly used for.
Shelf labels are more expensive. Because there isn't "an easy way" to provide the infrastructure for it.


PS: please don't hijack a topic with a title not related to your question!

I’m having issues using Waveshare 2.9" Flexible e-paper on an LOLIN D32 PRO.
I’m using the Arduino examples and I’m unsure on what definition to use as both:
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
//#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w IL0373

both don’t seem to work. My pinout is :


GxIO_Class io(SPI, /CS=5/ SS, /DC=/ 22, /RST=/ 21); //
GxEPD_Class display(io, /RST=/ 21, /BUSY=/ 4); //

Screen won’t turn on… what am I doing wrong?

My Pin-Layout is:
RST: 33 (T-RST)
DC: 27 (T-DC)
CS: 14 (T-CS)
CLK: 18 (SCK)

// LOLIN D32 Pro - my text here
GxIO_Class io(SPI, /CS=/ 14, /DC=/ 27, /RST=/ 33);
GxEPD_Class display(io, /RST=/ 33, /BUSY=/ 4);

With this setting the sketch is running on my LOLIN D32 PRO