TUTORIAL USING DF PLAYER MINI MODULE ARDUINO
DFPlayer Mini MP3 Player is a small and inexpensive MP3 module with a simple output that goes straight to the speakers. This module can be used as a stand-alone module with a built-in battery, speaker and push button or used in combination with an Arduino or other with RX / TX capability.
Here pin out dari DF Player mini :
However, the Pins we will use are vcc, rx, tx, spk_1, gnd, spk_2.
Just assemble the components as below:
Before entering the Arduino program there are 3 conditions for the mp3 module to function:
1. The MP3 file name is 0001.mp3
2. Save in the mp3 folder (in Micro SD create a folder with the name mp3 input the mp3 file in that folder).
3. Save in Micro SD Card
After that enter the program below:
#include <SoftwareSerial.h> // masukkan library
#include <DFPlayer_Mini_Mp3.h>
SoftwareSerial mySerial(10, 11);// tx rx
void setup () {
mySerial.begin (9600); // komunikasi software serial
mp3_set_serial (mySerial); // program set awal untuk memutar lagu.
delay(10);
mp3_set_volume (25);//setting volume pada speaker
}
void loop () {
mp3_play (3); // memutar lagu dengan nama file 0003.mp3
delay(3600000);// lama waktu lagu berputar
mp3_play (2);
delay(3600000);
mp3_play (1);
delay(3600000);
}
So many tutorials this time, Thank you and hope it is useful
Full Video
0 Comments