Skip to content

About

A library for WS2812 led matrix, controlled by ESP32

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

MicroMatrix

A powerful LED matrix control system for ESP32 with desktop simulation capabilities using Pygame.

Overview

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.

Key Features

  • 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

Testing with Pygame

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:

  1. Develop and test your LED matrix applications without physical hardware
  2. Visualize animations and effects in real-time
  3. Debug display issues in a controlled environment
  4. Optimize performance before deployment

Video Example Video Example

Running the Pygame Simulator

# 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)

Project Structure

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

Getting Started

  1. Installation

    # Clone the repository
    git clone [repository-url]
    cd MicroMatrix
    
    # Install required Python packages
    pip install -r requirements.txt
  2. Configuration

    • Adjust matrix dimensions in utility/costants.py
    • Configure WiFi settings if needed
    • Set appropriate pin assignments for your hardware
  3. Testing

    • Run the Pygame simulator: python test_pygame.py
    • Test on hardware: python test_neopixel.py

Hardware Requirements

  • ESP32 microcontroller
  • NeoPixel LED matrix (32x8 by default, configurable)
  • Power supply appropriate for your LED matrix
  • Optional: Various sensors (temperature, humidity, light, magnetometer)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Pygame community for the simulation capabilities
  • MicroPython team for the ESP32 support
  • NeoPixel library contributors

About

A library for WS2812 led matrix, controlled by ESP32

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages