DF Player Mini + Arduino Uno R3

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
iramos85
 
Posts: 3
Joined: Mon Nov 25, 2019 5:25 pm

DF Player Mini + Arduino Uno R3

Post by iramos85 »

This is actually part of a larger project, so bear with me experts, but I'm working on adding an mp3 player and speaker and using this code as a test:

Code: Select all

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

// Use pins 2 and 3 to communicate with DFPlayer Mini
static const uint8_t PIN_MP3_TX = 2; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 3; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);

// Create the Player object
DFRobotDFPlayerMini player;

void setup() {
  // Init USB serial port for debugging
  Serial.begin(9600);
  // Init serial port for DFPlayer Mini
  softwareSerial.begin(9600);

  // Start communication with DFPlayer Mini
  if (player.begin(softwareSerial)) {
    Serial.println("OK");

    // Set volume to maximum (0 to 30).
    player.volume(30);
    // Play the "0001.mp3" in the "mp3" folder on the SD card
    player.playMp3Folder(1);

  } else {
    Serial.println("Connecting to DFPlayer Mini failed!");
  }
}

void loop() {
}
The code is just designed to play the one file, song selection isnt necessary, eventually a trigger to start the song will be needed - but for now I'm more concerned with why I cannot I get a response to my DFPlayer Mini.

Does anyone have any experience with these little mp3 players? I have a microSD card inside the module, but when i have my Uno board connected to my pc, it doesnt recognize the board or the card. I'm not sure if thats supposed to happen or if my wiring is off.

I'm going off of the attached wiring diagram
Attachments
DF Mini wiring diagram.JPG
DF Mini wiring diagram.JPG (70.62 KiB) Viewed 434 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: DF Player Mini + Arduino Uno R3

Post by adafruit_support_mike »

Your best bet would be to check with DFRobot. They'll have more insight into their hardware than anyone else.

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: DF Player Mini + Arduino Uno R3

Post by michaelmeissner »

Well your code uses pins 2 & 3 for the serial connection, but the diagram shows pins 11 and 12 being connected.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”