E-paper calendar and agenda
Build it step by step
0 of 7 doneRun the library example
Show Hello on the panel.
Wire the SPI pins
Check your panel's pin names against the table.
Show the date
Fetch time from NTP and draw it.
Host a small JSON file
Make a list of events in the format shown.
Fetch and draw the events
Print them to serial first.
Add deep sleep
Wake once an hour.
Run on the battery
Measure the current in sleep with a multimeter.
How do you build an e-paper calendar and agenda?
A 4.2-inch e-paper display shows today's date and calendar events and updates every hour, running for months on a battery. You need ESP32 DevKit V1, 4.2 inch e-paper display, Li-Po battery 3.7 V 2000 mAh and TP4056 module with protection (USB-C). It takes 7 steps and about 240 minutes.
- Level
- Intermediate
- Time
- About 240 min
- Parts
- 4
Parts list
- Development BoardsBuyESP32 DevKit V1 × 1
- Displays
- BatteriesBuy
- PowerBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| E-paper VCC | ESP32 3V3 | Power |
| E-paper GND | ESP32 GND | Ground |
| E-paper DIN | ESP32 GPIO23 | SPI data |
| E-paper CLK | ESP32 GPIO18 | SPI clock |
| E-paper CS | ESP32 GPIO5 | Chip select |
| E-paper DC | ESP32 GPIO17 | Data or command |
| E-paper RST | ESP32 GPIO16 | Reset |
| E-paper BUSY | ESP32 GPIO4 | Busy flag |
| LiPo battery | TP4056 module B+ and B− | Charging |
| TP4056 OUT+ and OUT− | ESP32 5V (VIN) and GND | Battery power |
Code
E-paper keeps its picture with no power, so the ESP32 wakes once an hour, joins Wi-Fi, reads a small JSON file, redraws and sleeps again. Host the agenda file yourself, for example from a private script that reads your calendar, rather than putting calendar links or secret addresses in shared code. Choose the GxEPD2 class that matches your exact panel; the wrong one shows a garbled picture. A full refresh flashes black and white, which is normal. Refreshing more often than once every few minutes shortens the life of the panel. A dev board's regulator and USB chip draw current in deep sleep, so measure it; a bare module lasts far longer. Arduino IDE with the ESP32 boards package, board "ESP32 Dev Module".
Runs on a virtual ESP32 Dev Module in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// E-paper agenda: fetch events, draw, sleep for an hour. Libraries: GxEPD2, Adafruit GFX, ArduinoJson.
// Board: ESP32 Dev Module. Check your panel's driver name in the GxEPD2 examples (GDEW042T2 shown).
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
#include <GxEPD2_BW.h>
#include <ArduinoJson.h>
#include <time.h>
const char* WIFI_SSID = "YOUR_WIFI_NAME";
const char* WIFI_PASS = "YOUR_WIFI_PASSWORD";
// A small JSON file you host yourself (for example from a private script) in the form:
// {"events":[{"time":"09:30","title":"Maths lab"},{"time":"14:00","title":"Project review"}]}
const char* AGENDA_URL = "https://example.com/agenda.json";
GxEPD2_BW<GxEPD2_420, GxEPD2_420::HEIGHT> display(GxEPD2_420(/*CS*/ 5, /*DC*/ 17, /*RST*/ 16, /*BUSY*/ 4));
#define SLEEP_SECONDS 3600
String eventsText[6]; String evTime[6]; int n = 0;
void fetchAgenda() {
WiFiClientSecure client;
client.setInsecure(); // trade-off: no certificate check; use a real certificate for private data
HTTPClient http;
if (!http.begin(client, AGENDA_URL)) return;
if (http.GET() == 200) {
JsonDocument doc;
if (!deserializeJson(doc, http.getString())) {
for (JsonObject e : doc["events"].as<JsonArray>()) {
if (n >= 6) break;
evTime[n] = e["time"].as<String>(); eventsText[n] = e["title"].as<String>(); n++;
}
}
}
http.end();
}
void draw() {
struct tm t; getLocalTime(&t, 3000);
char date[32]; strftime(date, sizeof(date), "%A %d %B", &t);
display.setRotation(0);
display.setFullWindow();
display.firstPage();
do {
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setTextSize(3); display.setCursor(10, 40); display.print(date);
display.drawLine(10, 55, 390, 55, GxEPD_BLACK);
display.setTextSize(2);
for (int i = 0; i < n; i++) {
display.setCursor(10, 90 + i * 35); display.print(evTime[i]);
display.setCursor(100, 90 + i * 35); display.print(eventsText[i]);
}
if (n == 0) { display.setCursor(10, 100); display.print("No events today"); }
} while (display.nextPage());
}
void setup() {
display.init(115200);
WiFi.begin(WIFI_SSID, WIFI_PASS);
unsigned long t0 = millis();
while (WiFi.status() != WL_CONNECTED && millis() - t0 < 15000) delay(250);
if (WiFi.status() == WL_CONNECTED) {
configTime(19800, 0, "pool.ntp.org"); // UTC+5:30, change for your zone
fetchAgenda();
draw();
}
display.hibernate(); // the image stays with no power
esp_sleep_enable_timer_wakeup((uint64_t)SLEEP_SECONDS * 1000000ULL);
esp_deep_sleep_start();
}
void loop() {}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Power on | Date and events appear within 30 seconds |
| After sleeping | The image stays visible |
| An hour later | The screen updates by itself |
| No Wi-Fi | The old picture stays and the board sleeps |
If it does not work
Garbled image
Choose the right GxEPD2 panel class.
Blank screen
Check BUSY and RST wires and that the supply is 3.3 V.
Battery drains in days
Measure sleep current and remove power LEDs.
Events missing
Check the JSON format with a validator.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the e-paper calendar and agenda?
ESP32 DevKit V1, 4.2 inch e-paper display, Li-Po battery 3.7 V 2000 mAh and TP4056 module with protection (USB-C).
How long does the e-paper calendar and agenda take to build?
About 240 minutes for a intermediate maker, in 7 steps.
How do I know the e-paper calendar and agenda works?
Power on: Date and events appear within 30 seconds. After sleeping: The image stays visible. An hour later: The screen updates by itself.
Garbled image: what should I check?
Choose the right GxEPD2 panel class.
Blank screen: what should I check?
Check BUSY and RST wires and that the supply is 3.3 V.
Battery drains in days: what should I check?
Measure sleep current and remove power LEDs.
Events missing: what should I check?
Check the JSON format with a validator.
