> For the complete documentation index, see [llms.txt](https://docs.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petoi.com/biboard/demo-applications/14.play-mp3.md).

# 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 inputting 0\~6 numbers (.mp3 file index number) in the serial monitor.

Before compiling the demo, please [download, install and configure the software environment](https://docs.petoi.com/biboard/demo-applications/pages/-MVugl3T-mwZYPFHdZ3c#3.2.1-set-up-esp32-development-environment) ([Arduino IDE 1.8.\*](https://www.arduino.cc/en/software)*, development board esp32 2.0.\**, library [ESP8266Audio 1.9.7](https://www.arduino.cc/reference/en/libraries/esp8266audio/), [partition configuration BiBoard V0](https://app.gitbook.com/o/-M-_eWZUjFA4usjshHcZ/s/-MQ6a951Q6Jn1Zzt5Ajr-887967055/~/changes/0wTYGtIeSMImmLXG2XJn/biboard/demo-applications/13.add-hardware-partition-configuration-option-in-arduino-ide)).

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](https://docs.petoi.com/biboard/demo-applications/12.file-system-spiffs).

{% hint style="info" %}
Note:

* Arduino IDE 2.0 **cannot** add the large\_spiffs\_16MB (4.5MB APP with OTA/6.93MB SPIFFS) configuration option currently.&#x20;
* The [SPIFFS file upload plugin](https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/tag/1.0) in Arduino IDE 1.8.\* is written in Java. And Arduino IDE 2.0 is written in a different language (TypeScript + Golang), so the previous upload plugin cannot be used in Arduino IDE 2.0. There is no support for the Arduino IDE 2.0 SPIFFS file upload plugin currently.

So it is recommended that you temporarily install and use the [Arduino IDE 1.8.\* IDE](https://www.arduino.cc/en/software) to upload sketch and .mp3 file.

Of course, you can also use VS Code + PlatformIO to upload the sketch and .mp3 files. For details, please refer to the following documents:

[Getting Started with VS Code and PlatformIO IDE for ESP32 and ESP8266 (Windows, Mac OS X, Linux Ubuntu)](https://randomnerdtutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/#2)

[ESP32 with VS Code and PlatformIO: Upload Files to Filesystem (SPIFFS)](https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/)

Before uploading the sketch and .mp3 files, please move the "data" folder to the project root directory, store the code files in the "src" directory, and configure the partition option "board\_build.partitions" in the **platformio.ini** in the project root directory, as shown in the following figure:

![](/files/xqqVHzSvwvayS9MEexKg)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.petoi.com/biboard/demo-applications/14.play-mp3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
