This project demonstrates how to use a Waveshare 4.2 inch e-paper display with an ESP-WROOM-32 microcontroller. The code is designed to run on MicroPython and includes a simple example of displaying an image on the e-paper screen.
- ESP32 board (ESP-WROOM-32)
- Waveshare 4.2 inch e-paper display
- MicroPython firmware installed on the ESP32
e-paper pins:
| e-Paper Pin | Function | ESP32 GPIO |
|---|---|---|
| BUSY | Busy state output | GPIO13 |
| RST | Reset signal input | GPIO12 |
| DC | Data/Command control | GPIO14 |
| CS | Chip select | GPIO27 |
| CLK | Serial clock input | GPIO18 |
| DIN | Serial data input | GPIO23 |
| GND | Ground | GND |
| VCC | Power supply (3.3V) | 3.3V |
The deploy.sh script automates the process of deploying code to the ESP32:
./deploy.sh src/file.pyThe script will:
- Connect to the ESP32
- Copy all necessary files to the device
- Execute the specified file or main.py if no file is specified
The tools/to_gray.sh script converts images to the correct format for the e-paper display:
./tools/to_gray.sh input_image.jpgFeatures:
- Converts images to 2-bit grayscale (4 levels)
- Outputs 2 raw binary files suitable for gray and black data
Example:
./tools/to_gray.sh images/photo.png
# Creates: images/photo.gray
