Small project to drive a 7.5" grayscale e‑ink panel from an ESP32. Includes:
- An ESP32 firmware (eInkDriver.c) that fetches BMP images, converts to 4‑level grayscale with ordered dither + gamma LUT, and displays them on an e‑paper module.
- A Python helper (convertImage.py) to convert PNG/JPEG images into 4bpp C arrays for embedding.
- MQTT/Home Assistant integration for remote control.
Subscript: I don't like writing docs, so genAI helped with this page. If you're reading this, and you're a human a) I'm surprised you found my project b) I'm happy to help you implement this on your project.
- eInkDriver/
- eInkDriver.c — main ESP32 firmware
- convertImage.py — Python tool to convert images to 4bpp C arrays
- icons.h, secrets.h, other project files (expected)
- imageServer/
- imageServer.py - serves images over HTTP to the esp32.
- eInkImage.py - Helper class for the image server (
- Hardware: ESP32 board compatible with the e‑paper module used (pins in firmware), 7.5" e‑paper display.
- Toolchain: Arduino/PlatformIO or preferred ESP32 toolchain to compile and flash the C firmware.
- Python 3 + associated image libraris to run the conversion script.
- Install: pip install pillow
- secrets.h — add WIFI_SSID, WIFI_PASS, MQTT_SERVER, MQTT_PORT, MQTT_USER, MQTT_PASSWORD and any URL constants (URL1, URL2, URL3, etc.).
Script: convertImage.py Usage: python3 convertImage.py
- inputDirectory: folder with .png/.jpg/.jpeg files.
- OutputFilename: path to the generated C header (appends arrays).
- width/height: desired target size to resize each image to.
The script writes PROGMEM C arrays and width/height constants for each image.
- Downloads BMP image(s) from configured URLs, converts streamed BMP rows to 4bpp via a dithered/gamma LUT, and pushes rows to the display.
- Maintains persistent preferences (imageCount, displayIndex), Reducing unecessary flickering after deep sleep
- Exposes MQTT/Home Assistant entities for page selection, aux URL, refresh, and battery sensors (via HA-MQTT integration).
- Supports deep sleep wake via buttons and timer.
- Device ID and friendly name defined in eInkDriver.c (HA_DEVICE_ID, HA_DEVICE_FRIENDLY_NAME).
- Provided entities include page selection, aux URL, refresh button and battery sensors. Configure your Home Assistant MQTT discovery or use the included HA‑MQTT helper to register entities.
- BMP download: server must serve uncompressed BMP with expected resolution/pixel format.
- The driver must receive exactly 480x800 pixels image, in 8bit BMP format.
- Make sure you setup your secrets file with the correct URLS and credentials for MQTT etc
- It would be cool to do partial updates or less flickering.
- For example an indicator showing that it's thinking or working.