epaper_display_test.ino
Initialization and static display on the 4.7-inch e-paper screen.
Install the GxEPD2 library. Verify DC, RST, BUSY, and CS pins in the code according to your actual wiring (often fixed on the PCB). The screen consumes little power but refresh is slow. Flash and observe the display after a few seconds.
epaper_display_test.ino
#include <Arduino.h>
#include <GxEPD2.h>
#include <GxEPD2_BW.h>
#include <GxEPD2_320.h>
#include <Fonts/FreeMonoBold9pt7b.h>
// Configuration spécifique pour ED047TC1 (4.7 inch)
// Utilise l'interface parallèle 8-bit comme décrit dans les specs
GxEPD2_BW<GxEPD2_470_GDEW047T70, GxEPD2_470_GDEW047T70::HEIGHT> display(GxEPD2_470_GDEW047T70(/*CS=5*/ SS, /*DC=33*/ 33, /*RST=46*/ 46, /*BUSY=45*/ 45));
void setup() {
Serial.begin(115200);
Serial.println("Initializing e-paper...");
display.init(115200);
display.setRotation(0);
display.setFont(&FreeMonoBold9pt7b);
display.setTextColor(GX_BLACK, GX_WHITE);
display.setTextSize(2);
display.fillScreen(GX_WHITE);
display.setCursor(10, 30);
display.print("Hello PaperDIY!");
display.setCursor(10, 60);
display.print("ESP32-S3 + E-Paper");
display.drawRect(10, 80, 200, 100, GX_BLACK);
display.display();
Serial.println("Display updated");
}
void loop() {
// L'e-paper ne nécessite pas de refresh continu
delay(10000);
}