r/arduino • • 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

12 comments sorted by

View all comments

Show parent comment

1

u/DiegoMike1303 Sep 19 '26

Thank you for your help. I’m still a little confused. Does the GPIO pin (pin 7 in my scheme) start as an input or output? You say in order to trigger the sound card I should change it to OUTPUT briefly and then to INPUT. This suggests that it started as an INPUT, but you have me set it initially to LOW. Can you clarify?

1

u/Krististrasza Sep 19 '26

Yes, that is correct. You set it to be an INPUT. Then you set it to LOW. And to trigger you set it to OUTPUT and back to INPUT.

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?