GDEY042Z98 display issue on Heltec board

Hey everyone, hey @bns !

I made a project in august using ESP32-S3FN8 + GDEW042C37
I got some help here thank you, it worked like a charm

Now I need to build a second one using another screen because GDEW042C37 is out of stock

I found this one : GDEY042Z98 (https://buy-lcd.com/products/42-inch-e-paper-display-morochrome-spi-e-ink-for-digital-price-tags-gdey042t91-443)

My code does not work anymore, can you please provide me some help to adapt it to the new screen ?

#include <GxEPD2_3C.h>
#include <SPI.h>

// SPI secondaire (HSPI) pour l'écran
SPIClass hspi(HSPI);

// Brochage correct selon le schéma Heltec
#define EPD_CS   4   // Chip Select
#define EPD_DC   5   // Data/Command
#define EPD_RST  6   // Reset
#define EPD_BUSY 7   // Busy

// Déclaration de l'écran trichrome 4.2"
GxEPD2_3C<GxEPD2_420c, GxEPD2_420c::HEIGHT> display(GxEPD2_420c(EPD_CS, EPD_DC,     EPD_RST, EPD_BUSY));

void setup() {
  // Activation alimentation écran via Vext (GPIO 45)
  pinMode(45, OUTPUT);
  digitalWrite(45, LOW); // LOW = ON pour activer Vext

  Serial.begin(115200);
  delay(1000);
  Serial.println("Début du setup");

  // Initialisation du SPI secondaire avec brochage
  hspi.begin(3, -1, 2, 4); // SCK = 3, MISO = -1 (non utilisé), MOSI = 2, SS = 4

  // Affectation du SPI secondaire à l'écran
  display.epd2.selectSPI(hspi, SPISettings(4000000, MSBFIRST, SPI_MODE0));

  Serial.println("Initialisation de l'écran...");
  display.init(115200);
  delay(100);

  display.setRotation(1);
  display.setTextColor(GxEPD_BLACK); // Noir pour commencer
  display.setFullWindow();

  display.firstPage();
  do {
    display.setCursor(10, 30);
    display.setTextSize(2);
    display.print("HELLO EINK");
  } while (display.nextPage());

  Serial.println("Affichage terminé");
}

void loop() {
  // Rien ici pour l’instant
}

You’re in luck this time around, as the name of your eink display appears exactly in the display file of GxEPD2:


And you can confirm the listed driver on your linked display is the same as the one in the .h file for added confidence.

1 Like

Thank you @bns, I just switched the screen in the code but it didn’t work.Cannot see any error in the logs either.

#include <GxEPD2_3C.h>
#include <SPI.h>

// SPI secondaire (HSPI) pour l'écran
SPIClass hspi(HSPI);

// Brochage correct selon le schéma Heltec
#define EPD_CS   4   // Chip Select
#define EPD_DC   5   // Data/Command
#define EPD_RST  6   // Reset
#define EPD_BUSY 7   // Busy

// Déclaration de l'écran trichrome 4.2" (GDEY042Z98, SSD1683)
GxEPD2_3C<GxEPD2_420c_GDEY042Z98, GxEPD2_420c_GDEY042Z98::HEIGHT> display(
GxEPD2_420c_GDEY042Z98(EPD_CS, EPD_DC, EPD_RST, EPD_BUSY)
);

void setup() {
// Activation alimentation écran via Vext (GPIO 45)
pinMode(45, OUTPUT);
digitalWrite(45, LOW); // LOW = ON pour activer Vext
delay(50);

Serial.begin(115200);
delay(1000);
Serial.println("Début du setup");

// Initialisation du SPI secondaire avec brochage
hspi.begin(3, -1, 2, 4); // SCK = 3, MISO = -1 (non utilisé), MOSI = 2, SS = 4

// Affectation du SPI secondaire à l'écran
display.epd2.selectSPI(hspi, SPISettings(2000000, MSBFIRST, SPI_MODE0));

Serial.println("Initialisation de l'écran...");
display.init(115200);
delay(100);

display.setRotation(1);
display.setTextColor(GxEPD_BLACK); // Noir pour commencer
display.setFullWindow();

display.firstPage();
do {
display.setCursor(10, 30);
display.setTextSize(2);
display.print("HELLO EINK");
} while (display.nextPage());

Serial.println("Affichage terminé");
}

void loop() {
  // Rien ici pour l’instant
}

Hi @bns, any idea please? :pray:

Hi Pierrick,
I don’t see any obvious mistake. The only difference I see is that the SPI speed is different in your new code. Otherwise it looks good to me.
I’m not sure if the connector may be different. Or maybe you got something different than you ordered (eg BW instead of 3C). I’d recommend studying the bits you have, maybe some example code other than GxEPD2 if available.