https://github.com/flothinkspi/photopainter-esp32
Custom firmware for an ESP32 and the Waveshare PhotoPainter. The ESP32 fetches arbitary BMP files from the internet and streams them to the PhotoPainter over I2C over 2 Pins from the SDCard Slot. The SDCard slot also powers the ESP32 - Effectively enhancing the PhotoPainter to paint files from the internet once woken up via its RTC.
https://github.com/flothinkspi/photopainter-esp32
Last synced: 11 months ago
JSON representation
Custom firmware for an ESP32 and the Waveshare PhotoPainter. The ESP32 fetches arbitary BMP files from the internet and streams them to the PhotoPainter over I2C over 2 Pins from the SDCard Slot. The SDCard slot also powers the ESP32 - Effectively enhancing the PhotoPainter to paint files from the internet once woken up via its RTC.
- Host: GitHub
- URL: https://github.com/flothinkspi/photopainter-esp32
- Owner: FloThinksPi
- License: other
- Created: 2025-07-27T21:09:13.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T22:55:46.000Z (11 months ago)
- Last Synced: 2025-07-27T23:23:22.260Z (11 months ago)
- Language: C
- Size: 909 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP32 PhotoPainter Enhancement
**Upgrade your Waveshare PhotoPainter into an internet-connected smart photo frame**
This project provides custom firmware to add WiFi connectivity to the Waveshare PhotoPainter, enabling automatic image fetching and display from the web using an ESP32 microcontroller.
## π― Overview
ESP32 PhotoPainter Enhancement is a hardware/software solution that retrofits onto the [Waveshare PhotoPainter`s](https://www.waveshare.com/wiki/PhotoPainter) SDCard Slot. By utilizing the SD card slot, it seamlessly adds internet connectivityβno permanent hardware modifications required. Firmware for the ESP32(Fetcher) and the PhotoPainter(Renderer) are custom to enable this.
### How It Works
1. **ESP32**: Powered via the PhotoPainter's SD card slot.
2. **I2C Communication**: Uses two SD slot pins for high-speed I2C (600kHz).
3. **Smart Fetching**: Downloads BMP images from the internet and streams them to the PhotoPainter.
4. **RTC Wake-up**: Activates automatically when the PhotoPainter's RTC wakes the system and powers up the SDCard slot. So uses the same RTC deep sleep as the PhotoPainter that cuts of power from SDCard slot when going into deep sleep.
5. **Seamless Display**: Images are processed and shown on the 7.3" e-paper screen.
## ποΈ Wiring
### Hardware Setup
```
PhotoPainter SD Slot β ESP32 Wemos D1 Mini
βββ Power (3.3V) β VCC
βββ Ground β GND
βββ Pin 4 (SDA) β GPIO 21 (SDA)
βββ Pin 5 (SCL) β GPIO 22 (SCL)
To find out which pins are Pin 4/5 on the PhotoPainter consult a pinout of a microSDCard. The CS(Chip Select) on the SDCard Connector goes to Pin 5 of the PhotoPainter. The MISO port of the SDCard Connector goes to Pin 4 of the PhotoPainter.
```
### Software Components
```
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β ESP32 Master ββββββ I2C Protocol ββββββ PhotoPainter β
β (Fetcher) β β 600kHz, 123B β β (Renderer) β
β β β chunks β β β
β β’ WiFi Connect β β β β β’ Image Receive β
β β’ HTTP Download β β β β β’ BMP Processingβ
β β’ Format Convertβ β β β β’ E-paper Draw β
β β’ I2C Stream β β β β β’ RTC Control β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
```
## π Quick Start
### Prerequisites
- Waveshare PhotoPainter device
- ESP32 Wemos D1 Mini or compatible board
- MicroSD card adapter ([example](https://amzn.eu/d/5vNI9uq))
- Basic soldering skills for SD slot connections. I soldered it onto above adapter to create a non permenant connection and also dont destroy the PhotoPainter on soldering misstakes.
### 1. Flash ESP32 Firmware
```bash
# Adopt Platformio.ini with your correct COM Ports
pio run -t upload -e Fetcher
```
### 3. Flash PhotoPainter Firmware
```bash
# Adopt Platformio.ini with your correct COM Ports
pio run -t upload -e Renderer
# Copy firmware.uf2 to PhotoPainter via USB
# See /docs/photopainter-flash.md for details
# The attached script works on windows and sets the PhotoPainter in Flash mode and uploads the firmware file.
```
### 4. Configure WiFi
```bash
# On first boot, ESP32 creates WiFi hotspot "ESP32-PhotoFrame"
# Connect and configure your network
```
### 5.
```bash
# Change hardcoded URL List in fetcher.cpp to point at the ones you want to download.
# I propose to use a webserver with a/some static files and the user overwrites them on the webserver so the client(esp32 fetcher) code can stay the same while rotating images soley over the webserver.
```
## π Project Structure
```
ESP32PhotoFrame/
βββ src/
β βββ fetcher.cpp # ESP32 firmware (WiFi + I2C master)
β βββ renderer.cpp # PhotoPainter firmware (I2C slave + display)
βββ lib/
β βββ Config/ # Hardware config & I2C drivers
β βββ EPaper/ # E-paper display drivers
β βββ GUI/ # BMP processing & color conversion
β βββ Fonts/ # Text rendering
β βββ Examples/ # Test images/sample data
βββ ImageConverter/
β βββ dither.py # Python image converter
β βββ requirements.txt # Python dependencies
β βββ IMAGE_CONVERTER.md # Converter docs
βββ datasheets/ # Hardware docs
βββ utils/ # Upload utilities/scripts
βββ platformio.ini # Build config
```
## π License
This project is dual-licensed under MIT and Apache License 2.0. See [LICENSE](LICENSE) for details.
## π Acknowledgments
- **Waveshare** - For the excellent PhotoPainter hardware and documentation example project