#include <GxEPD2_BW.h>
#include <Adafruit_GFX.h>    // Core graphics library
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeSerif9pt7b.h>

// Set up the e-paper display
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display(GxEPD2_290(/*CS=*/ 5, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));

void setup() {
  Serial.begin(115200);

  // Initialize the e-paper display
  display.init();
  display.setRotation(1);
}

void loop() {
  // Clear the display
  display.fillScreen(GxEPD_WHITE);

  // Draw "Hello World" in the center of the display
  display.setFont(&FreeMonoBold12pt7b);
  display.setTextColor(GxEPD_BLACK);
  display.setCursor((display.width() - 11) / 2, display.height() / 2);
  display.println("Hello World");

  // Update the display
  display.display();

  // Wait for 10 seconds before clearing the display and drawing "Hello World" again
  delay(10000);
}
Loading
epaper-2in9