#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);
Serial.print("Black");
delay(10000);
display.setCursor((display.width() - 11) / 2, display.height() / 2);
delay(1000);
Serial.print("Hello");
display.println("Hello World");
// Update the display
display.display();
// Wait for 10 seconds before clearing the display and drawing "Hello World" again
delay(10000);
}