I just want it to play an audio file!!! WITS END!!

Hey folks,

I would just like to foreword that I'm probably going to look like a bit of an imbecile compared to all you clever people..

I'm working on a project that I would like to have a short sound file played through some basic speakers when the Arduino board receives power (preferably through USB but not impossible for me to get a power supply).

I purchased an Arduino Uno and this Arduino Music shield;

http://www.maplin.co.uk/p/arduino-uno-r3-development-board-n30ku

http://www.maplin.co.uk/p/music-shield-for-arduino-n99dg

TLDR: I tried the first method, couldn't make it upload, let alone work. Tried the "Mr Roberts" solution, it uploaded perfectly, but isn't actually functioning.

Long version:

I have followed every step in the instruction booklet. the contents of which can be read here;
http://linksprite.com/wiki/index.php5?title=Music_Shield_for_Arduino

And when I tried uploading it to the board (which I presume is installed with the shield properly as I see no other way to align all the pins), I got an error about there not being a directory for when it used #include "WProgram.h" (doing this from memory, I think this is the one).

A quick google told me that people were advising to replace this with "Arduino.h", which I did at every instance. This removed this error, but produced a new one complaining in the exact same manner about "WConstants.h"

I couldn't find this one in any of the tabs of the Music sketch collection, but found it in a file in the NewSoftSerial folder. I tried commenting it out, I tried replacing it with an if statement people online suggested, I tried replacing it with some variant of Arduino.h again (I can't remember which I tried)

Suffice to say, NOTHING worked.

I went back to this wiki page and noticed that there was a different solution by "Mr Roberts".
I went to the "github.com/jtroberts83/Linksprite-MP3-Sheild-Arduino" and followed it through. It uploaded perfectly. Finally!!

..But it wouldn't play the sound file. And the readme doc included with the files said there were multiple sketch tabs where you can change settings etc, but only one single sketch tab ever actually opened, and I couldn't find or get any more to open..

The microSD card I'm using is a Fat32 16gb one, so I'm wondering if I'm going to have to buy a 2GB fat16 microSD instead, but with everything else that's gone on, I feel like I'm missing something other than that..

I am honestly at my wits end with this, please could anyone give advice or help walk me through this to get it working??

Thank you in advance :frowning:

For starters you have not provided us with the code you tried to upload. If you people to look at what you did wrong you have to provide the code. We cannot guess your errors.

  1. Use this library

https://github.com/Seeed-Studio/Music_Shield

  1. Pick the example “playWithName”

  2. Adjust the line to the file you want to play

player.playOne(“record.ogg”);

  1. Upload and it should work.

The Maplin page says:

For an up to date Library we recommend the Seeed Studio Library click here to download

Lennyz1988:
For starters you have not provided us with the code you tried to upload. If you people to look at what you did wrong you have to provide the code. We cannot guess your errors.

  1. Use this library

GitHub - Seeed-Studio/Music_Shield: Seeed Studio Music Shield library

  1. Pick the example “playWithName”

  2. Adjust the line to the file you want to play

player.playOne(“record.ogg”);

  1. Upload and it should work.

I hadn’t modified anything from the files I’d linked so it was all in there ^^

Regardless, after doing what you advised and making some tweaks, I finally got it working!!! Thank you so so much, I really appreciate it! :smiley: