ESP-IDF implementation of the Orchestra M5GO project - a synchronized multi-device music player using M5Stack Core devices.
- Multi-device synchronization via ESP-NOW protocol
- 7 songs including solos, duets, and quintet pieces
- RGB LED visualization with color-coded song types:
- Blue: Idle state
- Green: Quintet pieces
- Yellow: Duet pieces
- Purple: Solo pieces
- Screen animations synchronized with music playback
- Button controls:
- Button A: Cycles through Jupiter Hymn (quintet) and Carnival Theme (solo)
- Button B: Cycles through Canon in D (duet), Carnival Variation, and Medallion Calls (solos)
- Button C: Cycles through Blue Bells and TV Time (solos)
- Jupiter Hymn - Quintet piece from Holst's The Planets
- Canon in D - Duet by Pachelbel
- Carnival of Venice Theme - Solo piece
- Carnival of Venice Variation 1 - Solo piece
- Blue Bells of Scotland - Traditional solo
- The Medallion Calls - Solo from Pirates of the Caribbean
- It's TV Time! - Solo from Deltarune
- 5x M5Stack Core ESP32 devices (M5GO)
- USB-C cables for programming
- Optional: Grove cables and connectors for physical connection
- PlatformIO Core or PlatformIO IDE
- ESP-IDF framework (automatically managed by PlatformIO)
- Clone the repository
- Open the project in PlatformIO
- Build the project:
pio run
Each M5GO device needs to be flashed with the same firmware. The device ID can be configured via:
- Hardware jumpers (GPIO pins)
- NVS storage
- Or modified in code before flashing each device
To flash a device:
pio run --target uploadTo monitor serial output:
pio device monitorEach device in the orchestra needs a unique ID (0-4). This can be set by:
- Hardware Method: Connect specific GPIO pins to ground
- Software Method: Modify
device_idinorchestra.cbefore flashing - NVS Method: Store ID in non-volatile storage
The devices automatically form an ESP-NOW network on startup. No WiFi configuration is needed as ESP-NOW operates independently.
- Power on all 5 M5GO devices
- Wait for initialization (blue LEDs indicate ready state)
- Press any button (A, B, or C) on any device to start a song
- All devices will synchronize and play their respective parts
- LEDs and screen animations will indicate the current song type
src/
├── main.c # Main application entry point
├── orchestra.c # Main orchestra logic and coordination
├── songs.c # Song data and melodies
├── audio.c # Audio playback using I2S
├── display.c # Screen control and animations
├── rgb_led.c # RGB LED control
└── espnow_comm.c # ESP-NOW communication
include/
├── orchestra.h # Main orchestra definitions
└── songs.h # Song structures and note definitions
- The audio system uses the ESP32's internal DAC via I2S
- Display uses SPI to communicate with the ILI9342C LCD controller
- RGB LEDs are SK6812 compatible, controlled via RMT peripheral
- ESP-NOW broadcasts are used for synchronization between devices
- No sound: Check volume setting and speaker connection
- LEDs not working: Verify GPIO 15 is correctly connected to LED data line
- Devices not syncing: Ensure all devices are powered and ESP-NOW is initialized
- Button not responding: Check GPIO pullup configuration and debounce timing
This project is based on the original UIFlow implementation and adapted for ESP-IDF.