myDFPlayer.enableLoop() sets the looping mode to on for the mp3 player myDFPlayer.playMp3Folder(0) - plays the first track in the mp3 folder delay(15000) - delay 15 seconds while playing the mp3 on loop myDFPlayer.disableLoopAll() - stop playback of mp3 after time elapsed.
I really want this to play a different track if a different button is pressed, or stop altogether if the break button is pressed. Is there a way to handle this differently? Thank you!
The trouble is - this thing will be playing these sound samples through a set of 6 amplified loudspeakers, at around 131dB. I need a way to stop this thing if need be.
As you can see from the code above, the thing essentially captures the button state, and then plays the appropriate sound sample for whatever button was pressed (button 2 - 7).
myDFPlayer.enableLoop() - this will enable the MP3 to be played on a loop. myDFPlayer.playMp3Folder(1) - play the second file in the MP3 folder. 2 for third, and so forth. delay(15000) - delay for 15 seconds (will eventually be set to a minute unless an alternate solution is found. myDFPlayer.disableLoopAll(); - stops all playing MP3's
My concern is that the delay(15000) would be blocking execution for anything else - making it difficult to listen for an interrupt. What would be the best approach here?