Hi everyone,
I am trying to get the DFRobot Mini MP3 player to work on an Arduino mega.
Wiring :
Mega MiniPlayer
VCC(5v) (VCC)
TX(18) (RX)
RX(19) (TX)
GND (GND)
Mini Player Speaker
SPK1 SPK1
SPK2 SPK2
Code:
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
DFRobotDFPlayerMini myDFPlayer;
void setup()
{
Serial1.begin(9600);
Serial.begin(9600);
Serial.println();
Serial.println(F("DFRobot DFPlayer Mini Demo"));
Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));
if (!myDFPlayer.begin(Serial1)) { //Use softwareSerial to communicate with mp3.
Serial.println(F("Unable to begin:"));
Serial.println(F("1.Please recheck the connection!"));
Serial.println(F("2.Please insert the SD card!"));
while(true){
delay(0); // Code to compatible with ESP8266 watch dog.
}
}
Serial.println(F("DFPlayer Mini online."));
myDFPlayer.volume(10); //Set volume value. From 0 to 30
myDFPlayer.play(1); //Play the first mp3
}
I have tried with an without the 1K resistor on the Rx wire.
Please help ?