ESP32-S3-Dev & Waveshare 7.5 Eink Display & GxEPD driver

Hi all,

I'm looking for some help with my ESP32-S3-Dev (n16p8) board, and the Waveshare 7.5 Eink display.

The display driver hat, is a waveshare rev2.3
The Waveshare 7.5 has: 075BN-T7-D2 on the back of it.

I'm using the GxEPD library, and trying the simple example of "HelloWorld".

I'm using this display driver: GxEPD2_750_T7, which I believe is for my eink display.

The default pins for the HelloWorld example don't match my board, for example I don't have a pin 23 for MOSI, but I've used these pins:

And have defined them in my constructor:

// Define your custom SPI and control pins

#define EPD_CS 10

#define EPD_DC 9

#define EPD_RST 8

#define EPD_BUSY 18

#define EPD_MOSI 11

#define EPD_SCK 12

// GxEPD2 display constructor (uses global SPI object)

GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(GxEPD2_750_T7(EPD_CS, EPD_DC, EPD_RST, EPD_BUSY));

The issue is, the screen clears and briefly shows the word: "HelloWorld" but then disappears.

This is the entire example of the sketch I'm using:

#include <SPI.h>
#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>

// Define your custom SPI and control pins
#define EPD_CS   10
#define EPD_DC   9
#define EPD_RST  8
#define EPD_BUSY 18
#define EPD_MOSI 11
#define EPD_SCK  12

// GxEPD2 display constructor (uses global SPI object)
GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(GxEPD2_750_T7(EPD_CS, EPD_DC, EPD_RST, EPD_BUSY));

const char HelloWorld[] = "Hello World!";

void waitForBusy(const char* message)
{
  Serial.print("Waiting for BUSY LOW - ");
  Serial.println(message);
  int lastState = digitalRead(EPD_BUSY);

  while (digitalRead(EPD_BUSY) == HIGH)
  {
    int currentState = digitalRead(EPD_BUSY);
    if (currentState != lastState) {
      Serial.print("BUSY pin changed to: ");
      Serial.println(currentState == HIGH ? "HIGH (Busy)" : "LOW (Idle)");
      lastState = currentState;
    } else {
      Serial.print(".");  // print a dot for each delay cycle
    }
    delay(100);
  }
  Serial.println("\nBUSY LOW detected, proceeding.");
}

void setup()
{
  Serial.begin(115200);
  delay(500); // Give serial some time to initialize

  // Initialize global SPI object with custom pins
  SPI.begin(EPD_SCK, -1, EPD_MOSI, -1); // SCK, MISO (not used), MOSI

  // Configure BUSY pin as input (redundant but safe)
  pinMode(EPD_BUSY, INPUT);

  Serial.println("Initializing display...");
  display.init(115200, true, 2, false);

  waitForBusy("after init");

  helloWorld();

  waitForBusy("after drawing");

  Serial.println("Putting display to hibernate...");
  display.hibernate();

  waitForBusy("after hibernate");

  Serial.println("Display hibernated.");
}

void helloWorld()
{
  display.setRotation(1);
  display.setFont(&FreeMonoBold9pt7b);
  display.setTextColor(GxEPD_BLACK);

  int16_t tbx, tby;
  uint16_t tbw, tbh;
  display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh);

  // Center text
  uint16_t x = ((display.width() - tbw) / 2) - tbx;
  uint16_t y = ((display.height() - tbh) / 2) - tby;

  display.setFullWindow();
  display.firstPage();
  do
  {
    display.fillScreen(GxEPD_WHITE);
    display.setCursor(x, y);
    display.print(HelloWorld);
  }
  while (display.nextPage());

  Serial.println("Hello World displayed.");
}

void loop() {}

Can someone please guide as to where I'm going wrong

Edit your post and add ^^^^ code tags. Also, read the pinned post 'How to get the most from the forum'

Apologies @sonofcy, I've added my formatting for the code, and also moved this post to "Display"

I just noticed you said you don't have a pin 23 for MOSI. The pin number can be anything, but the pin purpose in this case MUST be MOSI. There will either be a label on the board top or bottom, or in the datasheet for the board, OR it ca be software specified.

Thank you Sonofcy for wanting to help me with this, admittedly, I'm quite a novice at this and trying to figure this all out.

Yes, I did read that the MOSI pin can be defined as anything, and in my case I set it as 11. The ESP32-S3-Dev pin reference under SPI, also mentions MOSI pin is 11.
Do you think that is the issue why the text does persist after it's been updated?

I agree 11 is right, I don't think it can be any other pin, similarly for all the other SPI pins for SPI2. SPI3 can be any pin.

I can't be of much help at this point. I too have a ePaper 7.5" display from WaveShare I just got that I plan on using to display some weather info. I am 83 and not in the best health at the moment so I work very slow and I have several other hobbies. I hope you find an answer soon.

Thank you for trying to help, and being an inspiration of someone who doesn't give up on their hobbies.

If you need help with the library GxEPD2, you should look at ZinggJM/GxEPD2 · Discussions · GitHub.

Compare the inking on the flexible connector with the inking of the author's panels found in
GxEPD2_display_selection_new_style.h
Report the inking you see.

Report the board you select to compile for.
You can find the default HW SPI pins used then e.g. in
arduino-esp32/variants/esp32s3/pins_arduino.h at master · espressif/arduino-esp32 · GitHub

static const uint8_t SS = 10;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;

If you need to use different pins, then you need to re-map the HW SPI pins.
See in [GxEPD2_Example.ino] (GxEPD2/examples/GxEPD2_Example/GxEPD2_Example.ino at master · ZinggJM/GxEPD2 · GitHub) how you can do this.

Make sure that pin 1 of your display panel is connected to pin 1 of your adapter board.
If the frontside of the panel faces up, then the component side of the adapter board should also face up.

Good Luck!

This would indicate that your wiring is correct, and you selected a driver class for the correct controller.

But you might have an issue with the waveform table for your display.
Or an issue with your BUSY line, e.g. if you connect 5V to Vcc of your HAT with a 3.3V processor.
Or an issue with a weak power supply to the display.

Hi @silentobserver

Thank you looking into this, I followed your advice and opened a question on ZinggjM github forum, and he immediately replied and pointed out that based on the inking on the flexible connector, the display class was wrong.

I've not tested out the correct class as yet, but will update this thread in case anyone else runs into the same issue.

This was the correct display driver to use:
//#define GxEPD2_DRIVER_CLASS GxEPD2_750_GDEY075T7 // GDEY075T7 800x480, UC8179 (GD7965), (FPC-C001 20.08.20)

Based on the inking on the flexcable: FPC-C001

Thank you all for your help