Hi!
I'm using the DFPlayer Mini module on a Digispark PRO (Attiny167).
I couldn't make any DFplayer-ready libraries (for arduino) I tried to work with it.
So I searched the internet and found some sketches that some people wrote that sends data via serial directly to the module, without any library, and I could make it work in most functions I needed, as Play, Pause, Next and Previous songs.
Still, I couldn't make the all files random command work, even by writing 0x08 with the value 3, as stated in the DFRobot wiki:
I using this partial sketch attached to send the needed values to the Player: For instance, this one with the function set the Volume.
So although I can send commands to the DFPlayer, I don't know how to read something from it.
I need to be able to query the number of files present on the SD card, so I can create a random-play function myself, based on the number of MP3 files present.
I need something that perform like this, extracted from this DFRobot Library:
// value = myDFPlayer.readFileCounts(); //read all file counts in SD card
But without using any library. I know the command to be queried is 0x47, but I don't know how to perform it.
The "execute_CMD" function I have only sends data using serial, but doesn't have an option to get a value back.
Can anyone help me in writing a small function (with no library - none worked so far) so I can read a value from the DFplayer?
Specifically my need is to query manually the number of files on the sd card...
Thanks!
Sketch.ino (895 Bytes)