SD card Sound

Trying to play a sound file from a SD card …
I think I have this set up correctly, but get no sound.
This is the code I have:

#include <pcmConfig.h>
#include <pcmRF.h>
#include <TMRpcm.h>

#include <pcmConfig.h>
#include <pcmRF.h>
#include <TMRpcm.h>

//TMRpcm library is needed

#include “SD.h”
#define SD_ChipSelectPin 10
#include “TMRpcm.h”
#include “SPI.h”

TMRpcm tmrpcm;

void setup()
{
tmrpcm.speakerPin=9;
Serial.begin(9600);
if(!SD.begin(SD_ChipSelectPin))
{
Serial.println(“SD fail”);
return;
}
tmrpcm.setVolume(5);
tmrpcm.play(“test.wav”);

}

void loop() {
// put your main code here, to run repeatedly:

}

Wiring is:
CS to Pin 10
SCK to Pin 13
MOSI to Pin 11
MISO to Pin 12
VCC to 5 volts
Gnd to Ground
Speaker to Pin 9 & Gnd

using an UNO board & Catalex micro SD card adaptor
Tried both earphone and 8 OHM speaker
no amp at this point.

I have been trying to follow this example:

I am sure I have ( well, I think I have) the library loaded.

I downloaded a sound file and converted it to a wav file via

One time I got the error message “SD Fail” when I went to tools/serial monitor

Not sure about this wav or zip file … how does the code find my renamed test.wav file?

Thanks for looking.

One time I got the error message "SD Fail" when I went to tools/serial monitor

Did it do this just once or does it do it every time when you open the Serial monitor ?

What is the actual name of the file on the SD card and is it in the root folder ?

Only got the error message once .... When I go to the Serial Monitor now, it comes up blank on the SD card I have Siren ..... WAV file TMRpcm-1.0.0 ....... File folder with test.wav zip file included Thanks, Bruce in Mount Airy, MD

tmrpcm.play("test.wav");

The program is looking explicitly for a file named test.wav. Unless something very special is going on (I doubt it) then it will not open the zip file , find it and play it. Extract test.wav from the zip file and put it in the root folder of the SD card.

OK, think I changed it but still no sound and no error message. I have attached a photo of the directory, I think … is this the way it should be? Thanks, Bruce in Mount Airy, MD

I have attached a photo of the directory,

The file needs to be on the SD card, not on the PC. If that picture IS a list of files in the SD card, why are all those source files on the SD card?

Yes, that is on the SD card (G). I am very new to this and do not have much programming in my background, so please explain “all those source files” means. should the wav file be the only thing on the SD card? Thanks

Do you know what an 8.3 filename is? You may need to use 8.3 filenames, which means all UPPERcase, upto 8 characters before the '.', upto 3 characters after.

MarkT: Do you know what an 8.3 filename is? You may need to use 8.3 filenames, which means all UPPERcase, upto 8 characters before the '.', upto 3 characters after.

Upper case is NOT a requirement for 8.3 names. Never has been. .txt has been a perfectly valid extension since Bill Gates first started writing operating system software.

Only what I just looked up, I did rename the file to TEST.WAV but still no sound. deleted all else from the SD card, no help Thanks, Bruce

Well THANKS! Not sure what I tweaked, but it's working.