Muhammad_Munir
Published © GPL3+

How DF Player Play audio through Amplifier by using Arduino

How DF Player Play audio through Amplifier by using Arduino

BeginnerFull instructions provided1 hour27
How DF Player Play audio through Amplifier by using Arduino

Things used in this project

Hardware components

Arduino UNO
×1
Df player mini
×1
Jumper wires
×1
TPA3110 Audio Amplifier
×1
Loud Speaker
×1
12v Adapter
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Diagram

Code

Code

Arduino
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

SoftwareSerial mySerial(10, 11); // RX, TX (use Pins 10 and 11 for communication)
DFRobotDFPlayerMini myDFPlayer;

void setup() {
  Serial.begin(9600); // Debugging
  mySerial.begin(9600); // DFPlayer communication
  if (!myDFPlayer.begin(mySerial)) {
    Serial.println("DFPlayer Mini initialization failed!");
    while (true);
  }
  Serial.println("DFPlayer Mini ready.");
  
//  myDFPlayer.volume(30); // Set volume (0 to 30)
//  myDFPlayer.play(1);    // Play the first track (0001.mp3)
}

void loop() {
  myDFPlayer.volume(20); // Set volume (0 to 30)
  myDFPlayer.play(1);    // Play the first track (0001.mp3)
  delay(13000);
}

Credits

Muhammad_Munir
79 projects • 50 followers
I am Arduino programmer, also expertise in ESP32 and 8266 wifi modules.

Comments