Problema de conección de modulo dfplayer mini

hola, tengo un problema tratando de conectar mi esp32 a un modulo dfplayer mini para controlarlo, mi idea era armar un reproductor mp3 pero no logro hacer que conecten, la consola del compilador me indica que falla al conectar

este es el codigo que estoy utilizando

#include <HardwareSerial.h>

#include <DFRobotDFPlayerMini.h>

// Use pins 2 and 3 to communicate with DFPlayer Mini
static const uint8_t PIN_MP3_TX = 17; // Connects to module's RX 
static const uint8_t PIN_MP3_RX = 16; // Connects to module's TX 
HardwareSerial Myserial(1);

// Create the Player object
DFRobotDFPlayerMini player;

void setup() {

  // Init USB serial port for debugging
  Serial.begin(9600);
  // Init serial port for DFPlayer Mini
  Myserial.begin(9600, SERIAL_8N1, 16,17);

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

    // Set volume to maximum (0 to 30).
    player.volume(20);
    // Play the first MP3 file on the SD card
    player.play(1);
  } else {
    Serial.println("Connecting to DFPlayer Mini failed!");
  }
}

void loop() {

 
   }

Si veo bien la foto, están cruzados los cables Tx y Rx.

Tené en cuenta que Rx del ESP32 se conecta al Tx del DFplayer y Tx del ESP al Rx del DFp.

1 Like

gracias, al parecer ese era problema

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.