ArduinoGeneral

Mini Mp3 DFPlayer with Arduino Nano

userHead felixwu787 2020-08-13 16:08:32 896 Views2 Replies
Hi there,

I am using the DFPlayer - A Mini MP3 Player with an arduino Nano.
My code so far:
Code: Select all
#include <DFRobotDFPlayerMini.h>
#include <SoftwareSerial.h>

SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myPlayer;

void setup() {
  mySoftwareSerial.begin(9600);
  myPlayer.begin(mySoftwareSerial);
  delay(1);
  myPlayer.volume(30);
  delay(20);
  myPlayer.play(1); // play song number 1

}

void loop() {


}
The result is, that it plays the mp3 on the sdcard and stops.
Now I want it to be in a loop - and the end start the mp3 again.
But i couldnt figure out how to do it.
Any ideas?
Thanks!
2020-08-13 19:56:01 thank you so much! That was exactly what i was looking for! userHeadPic felixwu787