Item:DFPlayer Lecteur MP3 : Différence entre versions

Ligne 34 : Ligne 34 :
  
 
=Câblage=
 
=Câblage=
{{#annotatedImageLight:Fichier:Item-DFPlayer Lecteur MP3 Cablage.jpg|0=1094px|hash=|jsondata=|mediaClass=Image|type=frameless|align=center|src=https://www.wikidebrouillard.org/images/2/22/Item-DFPlayer_Lecteur_MP3_Cablage.jpg|href=./Fichier:Item-DFPlayer Lecteur MP3 Cablage.jpg|resource=./Fichier:Item-DFPlayer Lecteur MP3 Cablage.jpg|caption=|size=1094px}}<br />
+
<br />
 
=Code Minimal=
 
=Code Minimal=
<br />
+
{{#annotatedImageLight:Fichier:Item-DFPlayer Lecteur MP3 MP3-TF-16P bb.jpg|0=825px|hash=|jsondata=|mediaClass=Image|type=frameless|align=center|src=https://www.wikidebrouillard.org/images/9/93/Item-DFPlayer_Lecteur_MP3_MP3-TF-16P_bb.jpg|href=./Fichier:Item-DFPlayer Lecteur MP3 MP3-TF-16P bb.jpg|resource=./Fichier:Item-DFPlayer Lecteur MP3 MP3-TF-16P bb.jpg|caption=|size=825px}}<br />
 
{| class="wikitable" width="617" cellspacing="0" cellpadding="2"
 
{| class="wikitable" width="617" cellspacing="0" cellpadding="2"
 
| width="98" height="17" bgcolor="#999999" |
 
| width="98" height="17" bgcolor="#999999" |

Version du 10 décembre 2020 à 16:32


Item-DFPlayer Lecteur MP3 F1SVFJQJ6IF520P.jpg

DFPlayer Lecteur MP3

Module MP3 pour Arduino MP3-TF-16P

1,50EUR (€)


Description longue

Principe

Le DFPlayer Mini MP3 Player For Arduino est un petit module MP3 avec une sortie directement branchée sur le haut-parleur. Le module peut être utilisé comme un module autonome avec batterie, haut-parleur et boutons-poussoirs attachés ou utilisé en combinaison avec un Arduino UNO ou tout autre module avec des capacités RX / TX.

Il nécessite l'utilisation d'une carte microSD pour le stockage des fichiers MP3.


Item-DFPlayer Lecteur MP3 Miniplayer pin map.png

Caractéristiques

  • Fréquences d'échantillonnage prises en charge (kHz): 8 / 11,025 / 12/16 / 22,05 / 24/32 / 44,1 / 48
  • Sortie DAC 24 bits, prise en charge de la plage dynamique 90dB, prise en charge SNR 85dB
  • Prend entièrement en charge les systèmes de fichiers FAT16 et FAT32, prise en charge maximale de 32G de la carte TF, prise en charge de 32G de disque U, 64M octets NORFLASH
  • Une variété de modes de contrôle, mode de contrôle E / S, mode série, mode de contrôle du bouton AD
  • Données audio triées par dossier, prend en charge jusqu'à 100 dossiers, chaque dossier peut contenir jusqu'à 255 chansons
  • Volume réglable à 30 niveaux, égaliseur à 6 niveaux réglable

Bibliothèque

Pour utiliser facilement ce capteur, nous vous conseillons d'utiliser la bibliothèque DFRobot (présente dans le gestionnaire de bibliothèques arduino)

plus d'infos pour Importer des bibliothèques dans l'interface Arduino
Bibiothèque DFRobotPlayerMini.png




La bibliothèque est ici : https://github.com/DFRobot/DFRobotDFPlayerMini

Câblage


Code Minimal

Item-DFPlayer Lecteur MP3 MP3-TF-16P bb.jpg

DFPlayer Mini MP3
Avant le Setup Importation de la bibliothèque #include <SoftwareSerial.h>

#include <DFRobotDFPlayerMini.h>

Création de l’objet SoftwareSerial mySoftwareSerial(D5, D6);

DFRobotDFPlayerMini myDFPlayer ;

Dans le Setup Démarrage de l’objet mySoftwareSerial.begin(9600) ;

myDFPlayer.begin(mySoftwareSerial) ;

Dans le Loop Utilisation myDFPlayer.setTimeOut(500) ;

myDFPlayer.volume(20) ;

myDFPlayer.play(1);

Exemple

 1 // DFPlayer Code minimal pour test
 2 
 3 #include <SoftwareSerial.h>
 4 #include <DFRobotDFPlayerMini.h> 
 5 
 6 SoftwareSerial mySoftwareSerial(D5, D6);  // TX, RX
 7 DFRobotDFPlayerMini myDFPlayer ; 
 8 
 9 void setup() {
10   mySoftwareSerial.begin(9600) ;
11   myDFPlayer.begin(mySoftwareSerial) ;
12 
13 }
14 
15 void loop() {
16   // Joue les 10 premières secondes de chaque piste
17   myDFPlayer.setTimeOut(500) ;
18   myDFPlayer.volume(10) ;
19   myDFPlayer.next();
20   delay(10000);
21 
22 }

Commentaires

Published