r/arduino • u/DiegoMike1303 • Sep 19 '26
Using DFPlayer Pro Without Code
Is there a way to play a sound file on a DFPlayer Pro module from an Arduino Uno without using any code? I can trigger an Uno output pin to go high using my existing code but I want to avoid adding any code for the player. Any suggestions would be appreciated.
2
Upvotes
View all comments
Show parent comment
1
u/DiegoMike1303 Sep 19 '26
Okay, this is what I've got for code:
void setup() {
// put your setup code here, to run once:
pinMode(5,OUTPUT); // Sets pin 5 as OUTPUT, Pin 5 controls Main lights
pinMode(7,INPUT); // Controls Opening narration
pinMode(6,OUTPUT); // Controls Distraction light
pinMode(8,OUTPUT); // Controls Distraction noise
pinMode(9,OUTPUT); // Controls Dummy spotlight
pinMode(10,OUTPUT); // Controls Lid
pinMode(12,OUTPUT); // Controls Dummy scream
pinMode(11,OUTPUT); // Controls Dummy rise, lower, bounce
pinMode(13,OUTPUT); // Controls Exit narration
// Program Start
digitalWrite(7,LOW); // Opening narration starts (Sound module 1)
pinMode(7,OUTPUT);
delay(200);
pinMode(7,INPUT);
analogWrite(5,0); // Main lights fade on (Mosfet 1)
delay(2000);
delay(fadeDelay);
Does this look right?