DF Player Soundboard


I am relatively new to arduino, and have been making use of it in various capacities to support children with disabilities. That being said, I've never really learnt the basics and predominantly try and cut and hack apart code examples to get the result I need (I will eventually go back to the beginning to figure what i'm actually doing).

I am trying to build a basic sound board with 9 buttons, each playing a different song that is loaded onto a SD card.

I have used this guide as a basis and managed to get the device working perfectly with a start, stop next song button.


However, I need to edit the code to have 9 assignable buttons - each allocated to a specific song (eg. song 0001.mp3, 0002.mp3) that are loaded onto the sd card.

What parts of the code will need altering in order to do this?

Download the code, unzip it, then Reply, scroll down, and use the Attachments and other options to Attach the unzipped file. As posted on the site, the functions



are not shown.

[/pre] [/pre]

And you'll need some more pin assignments like these, altho these could all be byte instead of int:

int buttonNext = 2;
int buttonPause = 3;
int buttonPrevious = 4;

[pre]pinMode(buttonPause, INPUT);
pinMode(buttonNext, INPUT);
pinMode(buttonPrevious, INPUT);

Also missing:


Here is the closest code I have to my desired need. Currently the first track will play, but the buttons will not activate anything or change the song (files are named 0001, 0002, 0003 etc.) SD card. I have the arduino wired up the same as in the tutorial attached.

soundplayer.ino (3.75 KB)

Why do you use so many delays in your code? Do you really need them? If not, get rid of them - might even fix your original problem.

Its not my code - just a sketch I found online with the same goal. I'm a very early coder so most of it makes little sense to me!