A powerful LED matrix control system for ESP32 with desktop simulation capabilities using Pygame.
MicroMatrix is a sophisticated LED matrix control system designed for ESP32 microcontrollers. It provides a flexible framework for creating and managing LED matrix displays with the added benefit of desktop simulation using Pygame, allowing developers to test and debug their LED matrix applications before deploying them to hardware.
-
Hardware Support
- ESP32 microcontroller compatibility
- NeoPixel LED matrix support
- Configurable matrix dimensions (default: 32x8)
- Adjustable brightness levels
- Customizable refresh rates
-
Desktop Simulation
- Pygame-based simulation environment
- Real-time visualization of LED matrix output
- Pixel-perfect representation of the physical display
- Interactive testing capabilities
- Memory usage monitoring
-
Widget System
- Support for animated widgets
- GIF animation support
- Composite widget capabilities
- Navigation widgets for menu systems
- Custom widget positioning and layering
-
Additional Features
- Web server integration
- Cache system for optimized performance
- Multiple sensor support (temperature, humidity, light, magnetometer)
- WiFi connectivity (Station and Access Point modes)
- Asynchronous operation support
One of the standout features of MicroMatrix is its ability to simulate the LED matrix display on your desktop using Pygame. This allows you to:
- Develop and test your LED matrix applications without physical hardware
- Visualize animations and effects in real-time
- Debug display issues in a controlled environment
- Optimize performance before deployment
# Example of running the Pygame simulator
from led_panels.led_matrix import LedMatrix
from test_pygame import main
# Create a matrix instance
matrix_panel = LedMatrix()
# Add your widgets and animations
animated_widget = AnimatedWidget.from_gif('assets/gifs/your_animation.gif')
matrix_panel.add_child(animated_widget)
# Run the simulator
main(matrix_panel)MicroMatrix/
├── assets/ # Static assets (images, GIFs)
├── cache/ # Cache system files
├── connection/ # Network and communication modules
├── led_panels/ # Core LED matrix and widget implementations
├── lib/ # External libraries
├── mods/ # Additional modules (sensors, displays)
├── utility/ # Utility functions and constants
├── boot.py # Main boot file
├── test_pygame.py # Pygame simulation environment
└── test_neopixel.py # NeoPixel hardware test
-
Installation
# Clone the repository git clone [repository-url] cd MicroMatrix # Install required Python packages pip install -r requirements.txt
-
Configuration
- Adjust matrix dimensions in
utility/costants.py - Configure WiFi settings if needed
- Set appropriate pin assignments for your hardware
- Adjust matrix dimensions in
-
Testing
- Run the Pygame simulator:
python test_pygame.py - Test on hardware:
python test_neopixel.py
- Run the Pygame simulator:
- ESP32 microcontroller
- NeoPixel LED matrix (32x8 by default, configurable)
- Power supply appropriate for your LED matrix
- Optional: Various sensors (temperature, humidity, light, magnetometer)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Pygame community for the simulation capabilities
- MicroPython team for the ESP32 support
- NeoPixel library contributors

