#include <GxEPD.h>
#include <GxGDEH029A1/GxGDEH029A1.h> // Driver for 2.9-inch e-paper display
#include <Adafruit_GFX.h> // Graphics library
// Pin definitions
#define CS_PIN 10
#define DC_PIN 9
#define RST_PIN 8
#define BUSY_PIN 7
// Initialize the e-paper display
GxIO_Class io(SPI, CS_PIN, DC_PIN, RST_PIN);
GxEPD_Class display(io, RST_PIN, BUSY_PIN);
void setup() {
// Initialize Serial Monitor
Serial.begin(115200);
Serial.println("E-Paper Display with Arduino Uno");
// Initialize the e-paper display
display.init();
// Clear the display
display.fillScreen(GxEPD_WHITE);
display.update();
// Display text
display.setTextColor(GxEPD_BLACK);
display.setCursor(10, 30); // Set cursor position
display.setTextSize(2); // Set text size
display.print("Hello, E-Paper!");
// Update the display to show the content
display.update();
}
void loop() {
// Leave empty for static display
}
Loading
epaper-2in9
epaper-2in9