#include <GxEPD2_BW.h>
#include <Adafruit_GFX.h>
// --- Fonts (must be included explicitly) ---
#include <Fonts/FreeSerifBold12pt7b.h>
#include <Fonts/FreeMonoBold9pt7b.h>
// --- Shared SPI pins ---
// GPIO6 -> DIN (MOSI)
// GPIO4 -> CLK (SCK)
// --- 2.9" E-Paper Connections ---
// 3V3 -> VCC
// GND -> GND
// GPIO7 -> CS
// GPIO5 -> DC
// GPIO8 -> RST
// GPIO9 -> BUSY
// --- 2.13" E-Paper Connections ---
// 3V3 -> VCC
// GND -> GND
// GPIO10 -> CS
// GPIO11 -> DC
// GPIO12 -> RST
// GPIO13 -> BUSY
// Define both displays
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display29(
GxEPD2_290(/*CS=*/7, /*DC=*/5, /*RST=*/8, /*BUSY=*/9)
);
GxEPD2_BW<GxEPD2_213_B73, GxEPD2_213_B73::HEIGHT> display213(
GxEPD2_213_B73(/*CS=*/10, /*DC=*/11, /*RST=*/12, /*BUSY=*/13)
);
// Quotes array
const char* quotes[] = {
"Stay curious.",
"Small steps, big dreams.",
"Light tomorrow with today.",
"Simplicity is sophistication.",
"Begin anywhere."
};
const int numQuotes = sizeof(quotes) / sizeof(quotes[0]);
void setup() {
static int bootCount = 0;
bootCount++;
int quoteIndex = bootCount % numQuotes;
// Init both displays
display29.init();
display213.init();
// --- 2.9" Display (Inspirational Quote) ---
display29.setRotation(1);
display29.setFont(&FreeSerifBold12pt7b);
display29.setTextColor(GxEPD_BLACK);
display29.firstPage();
do {
display29.fillScreen(GxEPD_WHITE);
display29.setCursor(20, 70);
display29.print(quotes[quoteIndex]);
} while (display29.nextPage());
// --- 2.13" Display (Checklist) ---
display213.setRotation(0);
display213.setFont(&FreeMonoBold9pt7b);
display213.setTextColor(GxEPD_BLACK);
display213.firstPage();
do {
display213.fillScreen(GxEPD_WHITE);
display213.setCursor(10, 20);
display213.print("TODAY");
display213.setCursor(10, 50);
display213.print("[x] Buy Groceries");
display213.setCursor(10, 70);
display213.print("[ ] Call John");
} while (display213.nextPage());
}
void loop() {}