Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

πŸ“š BookCounter

A tiny physical book-reading tracker built around an ESP32 e-ink display. Press a button every time you finish a book β€” the count is saved forever, even when the battery dies.


Demo

Finished a book Reset animation
Confetti T-Rex CHOMP
Front Side
Front view Side view

Features

  • E-ink display β€” readable in sunlight, no backlight drain
  • Up button β€” increments count with a confetti burst animation
  • Down button (short press) β€” decrements count
  • Down button (long press, 1.5 s) β€” resets to zero with a T-Rex walking in and chomping the number away
  • Persistent NVS storage β€” count survives power cuts and battery swaps
  • Light sleep between presses β€” long battery life

Hardware

Part Link
Heltec Vision Master E213 V1.1 (ESP32 + 2.13" e-ink) AliExpress
Li-Po battery AliExpress
Tactile button Amazon UK

3D Printed Case

Print files are in the PrintFiles/ folder. Also available on Creality Cloud.

File Description
3MF/BookCounterWithArrows.3mf Ready-to-slice 3MF with both panels (recommended)
Front Panel v7.stl Front panel with button cutout and display window
Back Panel V5.stl Back panel / battery cover
Step/front new button.step Editable STEP source for the front panel
Step/Back Panel v5.step Editable STEP source for the back panel

Print in your filament of choice β€” no supports needed.


Software Setup

1. Install Arduino IDE

Download and install the Arduino IDE (version 2.x recommended).

2. Add the Heltec ESP32 board package

  1. Open File β†’ Preferences
  2. Paste the following URL into the Additional boards manager URLs field:
    https://resource.heltec.cn/download/package_heltec_esp32_index.json
    
  3. Open Tools β†’ Board β†’ Boards Manager, search for Heltec ESP32, and install it

3. Install required libraries

Open Tools β†’ Manage Libraries and install the following:

Library Install name Notes
Heltec eInk Modules heltec-eink-modules Drives the e-ink display β€” provides EInkDisplay_VisionMasterE213V1_1
Preferences (built-in) Part of the ESP32 Arduino core β€” no separate install needed

The ESP32 light-sleep functions used in the code (esp_light_sleep_start, esp_sleep_enable_gpio_wakeup, gpio_wakeup_enable) are also part of the ESP32 Arduino core and require no extra libraries.

4. Upload

  1. Open BookCounterdino/BookCounterdino.ino
  2. Go to Tools β†’ Board and select Heltec Vision Master E213
  3. Select the correct COM port under Tools β†’ Port
  4. Click Upload

Pin mapping

GPIO Role
17 UP button (active low, internal pull-up)
39 DOWN button (active low, external 10 kΞ© pull-up required β€” see note below)

Important β€” GPIO 39 has no internal pull-up: GPIO 39 on the ESP32 is an input-only pin that does not support internal pull-up resistors. INPUT_PULLUP is silently ignored for this pin. Without an external pull-up, the pin floats and the DOWN button (and sometimes the UP button) will stop responding after a cold power-on.

Fix: Solder a 10 kΞ© resistor between the GPIO 39 pin and the 3.3 V pin on the board. One leg to 3.3 V, the other leg to GPIO 39. The button itself is wired between GPIO 39 and GND as normal β€” no other changes needed.

3.3V ───10kΞ©β”œβ”€β”€ GPIO 39 ──── Button ──── GND

How It Works

Power on ──► display saved count
UP press ──► count++ ──► confetti animation ──► display new count
DOWN short ──► count-- ──► display new count
DOWN long ──► count = 0 ──► T-Rex CHOMP animation ──► display 0
Between presses: ESP32 light sleep (GPIO wake-up)

Count is stored in NVS (Preferences library) under the key bookctr/count so it persists across reboots and battery changes.


License

MIT β€” do whatever you like with it.

About

A tiny ESP32 e-ink book reading tracker with T-Rex animations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /