This example demonstrates how to use the esp32-mod-player
component to enable MOD file playback on ESP32 devices.
The example leverages the esp32-mod-player
component, which integrates the ModPlayer library as a submodule to provide efficient MOD file playback capabilities for ESP32.
- ESP32 device
- ESP-IDF v5.4 or later
esp32-mod-player
component (included in the main repository)
-
Build the example in the main project directory:
idf.py build
-
Flash the example to your ESP32 device:
idf.py -p /dev/ttyUSB0 -b 921600 flash monitor
Replace
/dev/ttyUSB0
with the port your ESP32 is connected to. -
MOD Files:
The example includes a mod
subdirectory containing MOD files sourced from modarchive.org. This directory is used to demonstrate MOD playback functionality.
To load the MOD files onto your ESP32, create and flash a SPIFFS partition using the following commands:
python $IDF_PATH/components/spiffs/spiffsgen.py 131072 mod spiffs.bin
python $IDF_PATH/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 write_flash -z 0x200000 spiffs.bin
After flashing, the example will automatically start MOD playback using the esp32-mod-player
component. Monitor the serial output for playback status and debug information.
- This example is part of the
esp32-mod-player
repository. For details on configuringModPlayer
, consult the library’s documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
- Bohdan Sadovyak