Compacte MP3-speler module voor Arduino en andere microcontrollers, met microSD-slot en USB-stickondersteuning.
SKU: OT4011 Número do artigo: NA087 EAN: 8720618827739 Localização: AD01.07
Alternativa
Módulo MP3 Serial UART TTL com slot Micro SD (alternativa YX5300)
€ 5,80
Ver esta alternativa
Como ligar o DFPlayer Mini (clone) módulo MP3 com slot para cartão MicroSD a um Arduino UNO ou ESP32, com um sketch de exemplo que podes carregar já.
This project demonstrates how to play MP3 audio files using the DFPlayer Mini module and Arduino Uno. Ensure your microSD card is formatted in FAT32 with an MP3 file placed in an 'mp3' folder (or root named 0001.mp3). When powered, the Arduino initializes the player, sets the playback volume, and starts playing the first audio track.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : DFPlayer Mini MP3 Player Demo
* Board : Arduino UNO (arduino:avr:uno)
* Parts : DF Player Mini
* Libraries : DFRobotDFPlayerMini 1.0.6
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
// Arduino pin 10 connects to DFPlayer TX, pin 11 connects to DFPlayer RX
SoftwareSerial dfSerial(10, 11);
DFRobotDFPlayerMini myDFPlayer;
void setup() {
Serial.begin(115200);
dfSerial.begin(9600);
Serial.println(F("Initializing DFPlayer Mini..."));
if (!myDFPlayer.begin(dfSerial)) {
Serial.println(F("Unable to begin DFPlayer Mini:"));
Serial.println(F("1. Recheck wiring"));
Serial.println(F("2. Insert formatted micro SD card with MP3 files"));
while (true) {
delay(100);
}
}
Serial.println(F("DFPlayer Mini online."));
// Set volume (0 to 30)
myDFPlayer.volume(20);
// Play the first MP3 file on the micro SD card
myDFPlayer.play(1);
Serial.println(F("Playing track 1..."));
}
void loop() {
// Print status messages if received from the player
if (myDFPlayer.available()) {
uint8_t type = myDFPlayer.readType();
int value = myDFPlayer.read();
if (type == DFPlayerPlayFinished) {
Serial.print(F("Track finished: "));
Serial.println(value);
}
}
}
Bibliotecas necessárias: DFRobotDFPlayerMini 1.0.6
Wiring diagram and example code generated by Codey.online — https://www.codey.online
This project connects an ESP32 to a DFPlayer Mini MP3 module to play audio tracks from a micro SD card through a connected speaker. The DFPlayer Mini is powered from 3.3V, and the ESP32 communicates with it using hardware Serial2 on GPIO 16 (RX2) and GPIO 17 (TX2). Format your micro SD card with FAT32 and place audio files in an 'mp3' folder (e.g. 0001.mp3) to begin playback.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : ESP32 DFPlayer Mini MP3 Player Demo
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : DF Player Mini
* Libraries : DFRobotDFPlayerMini 1.0.6
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <DFRobotDFPlayerMini.h>
DFRobotDFPlayerMini myDFPlayer;
void setup() {
Serial.begin(115200);
// Serial2: RX on GPIO 16, TX on GPIO 17
Serial2.begin(9600, SERIAL_8N1, 16, 17);
Serial.println(F("Initializing DFPlayer Mini..."));
if (!myDFPlayer.begin(Serial2)) {
Serial.println(F("Unable to begin. Check SD card and wiring!"));
while (true) {
delay(500);
}
}
Serial.println(F("DFPlayer Mini online."));
myDFPlayer.volume(20); // Set volume (0 to 30)
myDFPlayer.play(1); // Play track 0001.mp3
}
void loop() {
// Play next track every 10 seconds
delay(10000);
Serial.println(F("Playing next track..."));
myDFPlayer.next();
}
Bibliotecas necessárias: DFRobotDFPlayerMini 1.0.6
Wiring diagram and example code generated by Codey.online — https://www.codey.online
O DFPlayer Mini (clone) é um módulo leitor de MP3 compacto e potente, ideal para aplicações de áudio em projetos como Arduino ou outros microcontroladores. Este módulo pode reproduzir ficheiros MP3 diretamente a partir de um cartão microSD ou de uma pen USB, sem necessidade de hardware adicional.
Principais características:
O DFPlayer Mini é uma solução versátil para todos os seus projetos relacionados com áudio, quer pretenda adicionar efeitos sonoros ao seu design ou construir um sistema de áudio completo!
ATENÇÃO: Este não é o chip YX5200 original. O código existente para o chip YX5200 poderá ter de ser ajustado para o funcionamento correto.
| Formato compacto | Cabe facilmente em caixas pequenas graças às dimensões de 22mm x 30mm |
|---|---|
| Alimentação | Funciona com 3.2V a 5V, ideal para projetos portáteis |
| Dimensões | 22mm x 30mm |
| Adequado para | Arduino en andere microcontrollers |
| Operação simples | Bestuurbaar via seriële communicatie, knoppen of een combinatie van beide |
| Suporta vários formatos | Speelt MP3, WAV en WMA-bestanden |
| Armazenamento | Werkt met microSD-kaarten tot 32 GB |
| Amplificador integrado | Sluit direct een luidspreker aan voor helder geluid zonder extra versterkers |
| Cartão MicroSD | tot 32 GB |
Funciona muito bem. Faz o que tem de fazer.
Funciona bem
Comprei alguns, funciona bem
muito bom
Não ficas satisfeito? Tens 30 dias após a receção para devolver o produto.
Tudo sobre devoluções
DFPlayer Mini (clone) módulo MP3 com slot para cartão MicroSD