Build Your Own ESP32‑Powered ePaper Fortune Teller
#Hardware

Build Your Own ESP32‑Powered ePaper Fortune Teller

Mobile Reporter
2 min read

Learn how to turn an ESP32, an e‑ink display, and a few sensors into a pocket‑sized fortune‑telling gadget. The guide covers hardware selection, firmware setup, and deployment on both iOS and Android through a companion app.

Featured image

Platform Update

The latest ESP32‑C3 release, announced in March 2026, brings a 240‑MHz dual‑core CPU, integrated BLE 5.2, and a new low‑power mode that cuts standby consumption to 30 µA. Coupled with the 2.9‑inch e‑ink display from Waveshare, this combo is ideal for battery‑driven, always‑on devices. Android 14 and iOS 17 now expose unified BLE APIs that make pairing and data transfer straightforward.

Developer Impact

Hardware

  • ESP32‑C3 – 4 MB flash, 512 KB RAM, 5 V tolerant GPIOs.
  • Waveshare 2.9" e‑ink – 296×128 pixels, 3‑wire SPI, 1 ms refresh.
  • Accelerometer – MPU‑6050 for motion‑based fortune triggers.
  • Battery – 3.7 V Li‑Po, 500 mAh.

The ESP32’s deep sleep capability allows the device to wake only when the accelerometer detects a shake, then display a new fortune and return to sleep. This pattern keeps the battery alive for months.

Software

The firmware is written in Arduino‑style C++ and uses the EVE library for e‑ink rendering. BLE advertising is handled by the NimBLE stack, which is now part of the ESP-IDF 5.0 release. The companion mobile app, built with Flutter 3.10, connects to the device, fetches the latest fortune text from a cloud endpoint, and pushes it to the e‑ink screen.

The cross‑platform app uses the same Dart codebase, with platform channels for BLE. iOS requires a background mode entitlement for continuous BLE scanning, while Android 14’s new foreground service model simplifies the implementation.

Migration

From ESP32‑S2 to ESP32‑C3

If you’re upgrading an existing ESP32‑S2 project, replace the core libraries with ESP-IDF 5.0. The new BLE stack is backward compatible, but you’ll need to adjust the pin mapping for the e‑ink SPI bus.

From Native Android/iOS to Flutter

Migrating a native app to Flutter saves you from maintaining two separate codebases. The BLE plugin flutter_blue_plus supports both platforms and handles the new Android 14 background restrictions automatically.

Testing and Deployment

  • Unit tests: Use the Unity framework for C++ firmware tests.
  • Integration tests: Run the Flutter app on physical devices with the integration_test package.
  • CI/CD: GitHub Actions can build the ESP32 firmware with idf.py build and deploy the Flutter app to TestFlight and Google Play beta tracks.

Next Steps

  1. Order parts: ESP32‑C3, Waveshare e‑ink, MPU‑6050, Li‑Po.
  2. Clone the repo: https://github.com/simonbatt/esp32-fortune‑teller.
  3. Configure BLE: Edit config.h with your device name and UUID.
  4. Build firmware: idf.py build && idf.py -p /dev/ttyUSB0 flash.
  5. Run the app: flutter run on a connected phone.

With these steps, you’ll have a fully functional, battery‑powered fortune teller that talks to both iOS and Android devices. Happy hacking!

Twitter image

Comments

Loading comments...