14.Play MP3
There is a demo named testMP3 in the "OpenCatEsp32/ModuleTests" file directory. The main function of this demo is to play .mp3 files stored in the SPIFFS file system. Users can choose to play different .mp3 files by entering 0~6 numbers (the .mp3 file index) in the serial monitor.
Before compiling the demo, please download, install, and configure the software environment (Arduino IDE 1.8.19, development board esp32 2.0.12, library ESP8266Audio 1.9.7, partition configuration BiBoard V0 or BiBoard V1).
After compiling, use the latest SPIFFS file upload plugin to upload the .mp3 file to the SPIFFS file system partition of BiBoard. For details, please refer to the chapter File System SPIFFS.
For the BiBoard V1
On the BiBoard V1 mainboard, the two pins associated with the DAC function are already utilized by the voice module; therefore, to enable MP3 playback, a hardware modification is required (soldering a jumper wire to connect ESP32's pin 25 to the input pin of the power amplifier chip), as shown in the figure below:

After performing the hardware modification, if you upload the original OpencatEsp32.ino's firmware: when using the voice command to control the robot, the voice module can't provide a voice response, but the robot can perform the action response. If you restore the original hardware configuration (remove the jumper wire from the mainboard pins). The voice module can work normally. We have fully verified the functionality, so please feel free to modify the hardware settings; however, exercise caution when soldering jumper wires to ensure they connect to the correct pins.
Last updated
