Hey all,
First off, I am a beginner with arduinos and electronics and all self taught, so please bear with me. I am trying to build a LOLA droid from the Kenobi series. It is running a nano powered by a 7.4v li battery, connected to it is 3 sg90 servos, 1 mpu6050 accelerometer, a few leds, and a DFplayer mini. When I had it on the breadboard, everything was working just fine, however, once I switched it over to the PCB I had made, the dfplayermini stopped working (I have since learned to not take the components off your bread until you are fully finished with the project, lesson learned), everything else is working. I have tried 3 separate df players and none of them are working on the board.
My questions is, do any of you see an issue with my layout/schematics that may be causing an issue or is it possible that i have 3 bad dfplayers?
here is the test code i was running to see if i could get just the dfplayer to make some noise
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
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);
DFRobotDFPlayerMini player;
int soundDelay = 3000;
int busyPin = 13;
unsigned long startMillis = millis();
unsigned long currentMillis;
void setup() {
Serial.begin(9600);
softwareSerial.begin(9600);
if (player.begin(softwareSerial)) {
Serial.println("DFPlayer Connected");
player.volume(30);
player.play(1);
} else {
Serial.println("DFPlayer failed!");
}
pinMode(busyPin, INPUT);
}
void loop() {
currentMillis = millis();
if(currentMillis - startMillis >= soundDelay){ //If enough time has passed
//Serial.print(currentMillis-startMillis);
Serial.println(" Playing"); //Debug
player.play(1); //play sound
startMillis = currentMillis; //reset timer
}
}
The leds trigger on the dfplayer when they should, but no sound is coming out.
What do you all think? and thank you for your help.
-JMo