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
}