//DFPlayer: Mini mp3 Player
//Library GitHub - DFRobot/DFRobotDFPlayerMini: Arduino library for DFPlayer #include "SoftwareSerial.h" #include "Arduino.h" #include "DFRobotDFPlayerMini.h" #include <SoftwareSerial.h>
SoftwareSerial softwareSerial(10, 11);
Why do commands like player.next(); and player.previous(); work, while commands like player.play(1); player.volume(10); and player.playFolder(15, 4); don’t work? I’m trying to use then as commands in the void loop(). In my void loop the audio will play a 12 second diesel train horn every 5-4 minutes, aka for what every time delay(); I have set.
if (digitalRead(5) == HIGH) player.volumeUp();
if (digitalRead(6) == HIGH) player.volumeDown();
digitalWrite(12, HIGH); delay(200);
Is there a WEB site that lists the commands that DFRobotDFPlayerMini.h supports?
I'm obviously missing something. I've tried many of the (myDFPlayer.-----) commands in
and only a couple of them work.
using only player.next(); or player.previous(); will suffice but I'd like to get these three working;
I could do so much more with these three
Start by stripping your setup down to the simplest machine necessary to use the mp3 module. It looks like you have more going on currently.
Then, follow a tutorial that walks you through your hardware configuration and the commands.
After you get that working you can add the other stuff in one piece at a time.
In the picture’s center is a bridge rectifier, a big cap and a switching voltage regulator supplying 5VDC. Exclusive of the one of the LEDs, everything else in including the is in accordance with: https://akuzechie.blogspot.com/2021/04/arduino-based-mp3-player
You don’t see the five push buttons as I use a jumper to simulate the buttons. My void loop() eliminates much of the WEB sites code as I tried to get rid of stuff hoping to make more of the player.-----(); calls function.
It does nothing; I tried it as 01 and 001 also. I also tried player.playFolder(1, 1); and player.playMp3Folder(1); neither work.
Although I didn’t try them all, my conclusion is that pretty much only the commands used in the example function. I put it back to the original with player.next(); and it went back to working.