Nano control with DF Player

Hi

I am looking for a simple sketch to control my DF player for a charity project. I need the player to play one perhaps two tracks from a signal from the Nano. The signal to the Nano can be either high or low as it will be by a small radio tx at 5v. The general idea is to place the box with Nano on a wall near an exhibition with player and power and then activate via a small radio TX. In this case it is a steam railway and of course the sound will complement the item. Any idea's will be most welcome. Jim

This link provides an easy to use software library for the DFPlayer, example code, and an example wiring diagram. Take a look and feel free to ask any questions here.

Hi Thanks for your reply. I took a look at the git hub site and the wiring for the DF player and the Uno which looked similar to the one on the DF Player site. However the sketch was different, so I copied the file and loaded it into the Arduino Program, I then tried to verify it and it came up Checksum error. I am not able to look at the error and say "Got You"

So back to the DF Sketch I did try this with an UNO and it worked reasonable well. In the layout it had switches with grounded the IO pins I think. Given this I could ground these pins with a relay that would be controlled via the Radio TX. But the UNO is perhaps to much for this project both in size and capability. So given UNO v Nano are the pins the same I.E if I had say a UNO sketch with pins say 8.9.11.12 could I substitute a Nano and use the same pin numbers ( Given that the sketch could be loaded on it)

So can you look at this again and give me your thoughts

The example sketches are different because they use different libraries. I'm not sure what you're doing to get a chechsum error.

Please post your entire sketch in tags plus a neat, handrawn schematic.

In think stating the checksum error was wrong in that I cannot decide if it my action that gave it. In any case can we drop this.

This the site that I copied both the sketch and set up. I was thinking that I could change a switch for a relay which can be controlled via a Rx unit.

Given this sketch is for and Uno can I change the Uno for a Nano due space problems.

Look forward to your reply

The sketch does not use the library I linked. Please update your code to include the library, test it, and post it (in tags) here if you are having issues with it.

Ok Sketch from your site upload Ok. In the previous link I sent there were three buttons to control the player. So, having up loaded your sketch to the Uno how do I play the track. Also will this work with a Nano. I think I mentioned earlier that I had worked with Picaxe Chip but I am new to the Arduino.

Jim

The example sketch should automatically play a track from the SD card without any external input from buttons. If you want to add button control, you can use this library to sample a button connected to your Arduino. Once the button is pressed, you can then call "myMP3.play(trackNum);" to play a track.