Playing .wav files from SD card

I don’t know what an object is and i think that is what I’m trying to do. I get this error message when i try to Verify and Compile:

Arduino: 1.0.6 (Mac OS X), Board: “Arduino Uno”
DRUM_SET3:10: error: ‘TMRpcm’ does not name a type
DRUM_SET3.ino: In function ‘void setup()’:
DRUM_SET3:15: error: ‘TMRpcm’ was not declared in this scope
DRUM_SET3.ino: In function ‘void loop()’:
DRUM_SET3:21: error: ‘TMRpcm’ was not declared in this scope

please help my file are attached. All of the files but DRUM_SET3 are libraries I added to my project.

PLEASE HELP.

THANKS

DRUM_SET3.ino (352 Bytes)

pcmConfig.h (4.01 KB)

pcmRF.cpp (2.61 KB)

pcmRF.h (429 Bytes)

TMRpcm.cpp (43.3 KB)

TMRpcm.h (960 Bytes)

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

Where are these files on disk in relation to the DRUM_SET3.ino file ?

I see one error right off the bat.

TMRpcm TMRpcm;

You can't have the name of the object be the same as the type. If you make one of those capital letters lower case that will be enough of a difference. But when you create the class TMRpcm you are essentially making TMRpcm a new keyword. So you can't use it for a variable name anymore.

Your TMRpcm.h file has a setup and loop function defined in it. I don't think that is going to work out.

Maybe you should look at some of the examples of how to create a library.

They are just on separate tabs on the software.

Delta_G:
I see one error right off the bat.

TMRpcm TMRpcm;

You can't have the name of the object be the same as the type. If you make one of those capital letters lower case that will be enough of a difference. But when you create the class TMRpcm you are essentially making TMRpcm a new keyword. So you can't use it for a variable name anymore.

i tried making it

TMRpcm tmrpcm;

but i still get the error message saying that TMRpcm doesn't name a type.

PLEASE HELP.

Please answer the questions posed in this thread and take note of the comments made.

UKHeliBob:

#include <TMRpcm.h>

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



Where are these files on disk in relation to the DRUM_SET3.ino file ?

Delta_G:
Your TMRpcm.h file has a setup and loop function defined in it. I don’t think that is going to work out.

UKHeliBob:

#include <TMRpcm.h>

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



Where are these files on disk in relation to the DRUM_SET3.ino file ?

I changed the files to be libraries in stead of different tabs. i don’t know if this makes a difference.

I don't necessarily need to use this program but I need guidance on how to go about playing a .wav file from my SD card.

Any help is really appreciated.

I changed the files to be libraries in stead of different tabs. i don’t know if this makes a difference.

It makes a big difference. Which libraries folder did you put the files in ? There are two such folders in a standard Arduino installation. What did you name the actual folders that the files are in ?

#include <pcmRF.h>

This form of #include looks first in the system libraries folder for a folder with exactly the same name as the .h file then in the sketches folder libraries folder for the same thing.

#include "pcmRF.h"

This form of #include looks for the named file in the same folder as the sketch.
If you put the files on tabs in the IDE they are stored in the sketch folder.