Codey OnlineArduino- & ESP32-Komponentenbibliothek › DF Player Mini
DF Player Mini
Sensoren

DF Player Mini

DF Player Mini MP3-Player mit TF-Kartenleser

Breite: 44.8 mm

Pinbelegung — DF Player Mini

Pin Signal Beschreibung
VCC power Top-left header pad, top pin
RX RX Left header pad, second pin from top
TX TX Left header pad, third pin from top
DAC_R analog Left header pad, fourth pin from top
DAC_I analog Left header pad, fifth pin from top
SPK_1 data Left header pad, sixth pin from top
GND ground Left header pad, seventh pin from top
SPK_2 data Left header pad, bottom pin
BUSY digital Top-right header pad, top pin
USB- data Right header pad, second pin from top
USB+ data Right header pad, third pin from top
ADKEY_2 analog Right header pad, fourth pin from top
ADKEY_1 analog Right header pad, fifth pin from top
IO_2 digital Right header pad, sixth pin from top
GND ground Left header pad, seventh pin from top
IO_1 digital Right header pad, bottom pin

Beispielschaltplan — DF Player Mini

Von Nach Kabel
board:5V x1:VCC red
board:GND x1:GND black
board:D10 x1:RX green
board:D11 x1:TX blue

Arduino-Beispielcode — DF Player Mini

Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.

#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>

SoftwareSerial dfSerial(10, 11); // Arduino RX, TX
DFRobotDFPlayerMini dfPlayer;

void setup() {
  Serial.begin(9600);
  dfSerial.begin(9600);

  Serial.println("Initializing DFPlayer Mini...");

  if (!dfPlayer.begin(dfSerial)) {
    Serial.println("DFPlayer Mini not detected. Check wiring and SD card.");
    while (true) {
      delay(1000);
    }
  }

  Serial.println("DFPlayer Mini ready.");
  dfPlayer.volume(20); // Range: 0 to 30

  // Play the first track on the microSD card.
  dfPlayer.play(1);
  Serial.println("Playing track 1.");
}

void loop() {
  // Nothing to do here for the basic example.
}

Ähnliche Komponenten

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

3.5 inch TFT LCD Shield

3.5 inch TFT LCD Shield

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Bau dein Arduino- oder ESP32-Projekt mit AI

Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.

Kostenlos starten