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

  #define BUSY_PIN       3
  #define RST_PIN        2
  #define DC_PIN         19
  #define CS_PIN         9
  #define SCL_PIN        4
  #define SDA_PIN        6
//#define GND
//#define VCC

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

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

  // Initialize the e-paper display
  display.init();
  //display.init(115200, true, 10, false, SPI, SPISettings(4000000, MSBFIRST, SPI_MODE0));
  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);
}
esp:0
esp:1
esp:2
esp:3
esp:4
esp:5
esp:6
esp:7
esp:8
esp:9
esp:10
esp:18
esp:19
esp:GND.1
esp:3V3.1
esp:3V3.2
esp:GND.2
esp:RST
esp:GND.3
esp:GND.4
esp:5V.1
esp:5V.2
esp:GND.5
esp:GND.6
esp:GND.7
esp:GND.8
esp:GND.9
esp:RX
esp:TX
esp:GND.10
epd1:BUSY
epd1:RST
epd1:DC
epd1:CS
epd1:CLK
epd1:DIN
epd1:VCC
epd1:GND