Trouble with DFPlayer mini mp3 and others

Hi all. I'm building my daughter a UFO, using an Arduino Nano (due to space restrictions), and a TLC5940 breakout board, that controls LED strip lighting for different animation stages of the UFO. I will also be controlling a continuous rotation servo that will kidnap (winch up and down) a cow. The TLC5940 uses pins D3, 9, 10, 11 & 13 for its control, I'm using D5 for additional white LED effects, and D6 for the cow servo. I want to use a DFPlayer mini mp3 module to play sound (I've used them before in previous, less complicated projects, with great success. A lot of the designs for controlling a DFPLayer from Arduino Nano use D10/11 for serial communication, or even D2/3. There's one sketch that I was hopeful for, as it uses the Nano's RX/TX, but the example sketch won't compile (quite a few errors - template argument invalid, 'Mp3Notify' was not declared in this scope, for example). So, I have to find another way to control the DFPlayer via the Nano without using any of the already occupied pins as mentioned before. On the DFPlayer SD card, I have 4 mp3 files that are designed for each of the UFO stages (I've written functions and sketches for each of them, and want to use a command to play each specific mp3 file on demand; the only other alternative that I can see is to initialise the Nano, TLC and DFPlayer on power up, play one long mp3 file (independently of any Nano control), and use delays and loops to effectively sync up the sound and lighting/servo actions. Any help or comment will be most appreciated!

It seems like that the most example sketches uses SoftwareSerial to talk with DFPLayer module. In that case you can use any pair of digital pins of your Nano for that.
For example, you can choose D7 and D8 - If I understand correct, you don't use it in your setup.

you can use any 2 pins for SoftwareSerial to control your DFPlayer. The challenge might actually come from anything in the code that relies heavily on interrupts and could thus impact SoftwareSerial's ability to handle properly the communication with the module

You could also use Hardware Serial provided you disconnect the pins when uploading code.

post the code and you electronic / electric schema - there might be other things at play

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.