E-reader firmware for M5Paper (ESP32, 540×960 e-ink, GT911 touch). Pairs with a self-hosted book server that renders pages to JPEG on demand.
- PSRAM page cache with background prefetch (±3 pages)
- Two-tier sleep: light sleep at 10s idle, full shutdown at 10min
- Instant offline restore via LittleFS page cache + NVS metadata
- Cover thumbnails in library view
- Server progress sync (Jellyfin-style)
- M5Paper (ESP32-D0WDQ6-V3, 16MB flash, 8MB PSRAM)
- GT911 capacitive touch
- Three side buttons (GPIO 37/38/39)
- M5Unified ≥ 0.2.5
- M5GFX ≥ 0.2.7
- ArduinoJson
- Install libraries above via Arduino Library Manager.
- Board: M5Paper. PSRAM: Enabled.
- Copy config:
Edit
cp config.h.example config.h
config.hwith your WiFi credentials and server IP/port. - Compile and flash.
This firmware is a client only. You need a compatible server exposing:
| Method | Path | Purpose |
|---|---|---|
GET |
/api/books |
JSON list of books (id, title, total_pages, current_page) |
GET |
/api/books/{id} |
Book metadata (title, current_page, total_pages) |
GET |
/api/books/{id}/page/{n}?quality=80 |
Rendered page JPEG (540×960) |
GET |
/api/books/{id}/cover?w=80&h=110 |
Cover thumbnail JPEG |
POST |
/api/books/{id}/progress?page=N |
Update reading progress |
The server is not part of this repo.
Apache 2.0