#include <GxEPD2_BW.h>
#include <Adafruit_GFX.h>
// =====================================================
// ESP32 DevKit + Wokwi 2.9" E-Paper
// Wokwi part: board-epaper-2in9
// =====================================================
#define EPD_CS 5
#define EPD_DC 17
#define EPD_RST 16
#define EPD_BUSY 4
#define EPD_DIN 23
#define EPD_CLK 18
// Wokwi 2.9" e-Paper
GxEPD2_BW<GxEPD2_290, GxEPD2_290::HEIGHT> display(
GxEPD2_290(
EPD_CS,
EPD_DC,
EPD_RST,
EPD_BUSY
)
);
// =====================================================
// Draw TODAY checklist
// =====================================================
void drawChecklist()
{
display.setFullWindow();
display.firstPage();
do
{
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setFont(NULL);
// -----------------------------------------------
// TITLE
// -----------------------------------------------
display.setTextSize(2);
display.setCursor(105, 25);
display.print("TODAY");
display.drawLine(90, 31, 205, 31, GxEPD_BLACK);
// -----------------------------------------------
// 1. Morning Walk - CHECKED
// -----------------------------------------------
display.drawRect(10, 40, 18, 18, GxEPD_BLACK);
// Check mark
display.drawLine(13, 49, 18, 54, GxEPD_BLACK);
display.drawLine(18, 54, 26, 44, GxEPD_BLACK);
display.setTextSize(1);
display.setCursor(38, 53);
display.print("Morning Walk");
display.drawLine(8, 62, 288, 62, GxEPD_BLACK);
// -----------------------------------------------
// 2. Read Book - CHECKED
// -----------------------------------------------
display.drawRect(10, 69, 18, 18, GxEPD_BLACK);
display.drawLine(13, 78, 18, 83, GxEPD_BLACK);
display.drawLine(18, 83, 26, 73, GxEPD_BLACK);
display.setCursor(38, 82);
display.print("Read Book");
display.drawLine(8, 91, 288, 91, GxEPD_BLACK);
// -----------------------------------------------
// 3. Work on Project
// -----------------------------------------------
display.drawRect(10, 98, 18, 18, GxEPD_BLACK);
display.setCursor(38, 111);
display.print("Work on Project");
display.drawLine(8, 120, 288, 120, GxEPD_BLACK);
// -----------------------------------------------
// 4. Call Mom
// -----------------------------------------------
display.drawRect(10, 127, 18, 18, GxEPD_BLACK);
display.setCursor(38, 140);
display.print("Call Mom");
}
while (display.nextPage());
}
// =====================================================
// SETUP
// =====================================================
void setup()
{
Serial.begin(115200);
Serial.println("ESP32 Wokwi 2.9 inch E-Paper");
Serial.println("TODAY Checklist");
display.init(115200);
// Landscape orientation
display.setRotation(1);
drawChecklist();
Serial.println("Display updated.");
}
// =====================================================
// LOOP
// =====================================================
void loop()
{
// E-paper retains the image.
// No continuous refresh required.
delay(1000);
}