- Project Overview
- System Architecture
- Directory Structure
- Technical Specifications
- Features
- Installation
- Development Notes
- Contributing
- License
- Authors
This project implements a web image display system using an M5StickC-Plus device with a supporting Python server for image processing. The system fetches images from a web source, processes them to the correct display dimensions, and shows them on the M5StickC-Plus LCD screen with proper error handling and user feedback.
-
M5StickC-Plus Client
- Handles image display and user interface
- Manages WiFi connectivity
- Implements memory-efficient image downloading
- Provides visual feedback with loading bar and status messages
-
Python Image Processing Server
- Pre-processes images to exact display dimensions (240x135)
- Serves scaled images via HTTP
- Implements automatic image refresh
- Handles image download and scaling operations
/
├── esp32_client/
│ ├── main.py # Main M5StickC-Plus program
│ └── boot.py # Boot configuration
│
└── server/
├── image_server.py # Image processing server
├── config/
│ └── config.json # Server configuration
├── images/ # Image storage
├── logs/ # Server logs
└── venv/ # Python virtual environment
- Display: 135x240 LCD (ST7789v2 driver)
- Memory: ~47KB available RAM
- Operating Mode: Landscape (rotation 1)
- Screen Brightness: 25%
- Image Format: JPEG (240x135 pixels)
- Python 3.x
- PIL (Python Imaging Library)
- HTTP Server
- JSON Configuration
- Logging System
- WiFi connectivity with error handling
- Efficient image downloading with chunked transfer
- Progress bar for download status
- Memory management with garbage collection
- Auto-refresh every 60 seconds
- Manual refresh via Button A
- Status message display
- Error recovery mechanisms
- Image scaling to exact display dimensions
- Automatic image refresh
- RESTful image serving
- Configuration management
- Logging system
- Service management
- Set up Python environment and install dependencies:
python -m venv server/venv
source server/venv/bin/activate
pip install pillow requests jsonschema
- Configure the server:
- Edit
server/config/config.json
with appropriate settings - Set up the service:
- Edit
sudo cp image_server.service /etc/systemd/system/
sudo systemctl enable image_server
sudo systemctl start image_server
- Flash MicroPython to M5StickC-Plus
- Upload
main.py
to the device - Configure WiFi settings in
main.py
:
SSID = 'your_wifi_ssid'
PASS = 'your_wifi_password'
URL = 'http://your_server_ip:8080/image.jpg'
- Chunk-based downloads (512B chunks)
- Regular garbage collection
- Memory monitoring
- File cleanup routines
- Pre-scaled images from server
- Centered status messages
- Thin loading bar (4px)
- Black background for text visibility
- Network connectivity recovery
- Memory allocation failures
- File system management
- Download timeouts
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or support, please open an issue in the repository.