How to connect a YX5300 serial mp3 player module to esp32?

507 Views Asked by At

I'm pretty new to IOT and esp32 but so far managed to learn by myself, however, when I tried connecting a YX5300 serial mp3 module to my esp32 I have struggled to even make the #include libraries work.

I am using vscode along with platformio and I installed the "SerialMP3Player" library in my project to make it work.

After installing the library to my project i got errors saying that the "SoftwareSerial" library needs to be installed aswell, so I installed it and now, after doing that, my current error is this:

the build error i recieved after installing both libraries

So my question is what to do now? continue to find and install libraries that pop up in build errors or am i just missing something obvious?

Also, is it even possible to connect this module to an esp32 board? I only came across examples using arduino board variants.

Thanks!

1

There are 1 best solutions below

1
On

The SoftwareSerial library is meant for Microchip Atmega microcontrollers. Most likely nobody has ever bothered to use this device's library (SerialMP3Player) with other devices, you might be the first to port it to ESP32 - if you feel up to the task.

After a quick look this doesn't seem very difficult - the code looks to be quite well abstracted and only talks to the SoftwareSerial library. You'd need to replace that with something that works on ESP32. I'd suggest a regular old HardwareSerial which uses a hardware UART - there are plenty of those on ESP32.