" " DOES NOT NAME A TYPE ,,, LIBRARY ERRORS

HELLO EVERYONE ,,
I AM NEW TO THIS FORUM AND EVEN NEW TO ARDUINO.
I WAS MAKING A VOICE PROJECT WITH HELP OF ARDUINO BUT WHENEVER I TRY TO ADD A NEW LIBRARIES IN THE LIBRARY FOLDER OF ARDUINO IT ALWAYS SHOWS A ERROR "TMRpcm DOES NOT NAME A TYPE" OR ANY OTHER LIBRARY EXCEPT THIS ONE';;;
I EVEN FOUND SAME KIND OF ERROR WHEN I WAS USING DS1307 LIBRARY. BUT SOME HOW WAS ABLE TO FIX IT AFTER 5MONTHS
AND NOW I AM REALLY FRUSTRATED PLS PLS PLS HELP ME WITH THIS ERROR. :disappointed_relieved: :disappointed_relieved: =( =(

PLS HELP ME OUT WITH THIS
REGARDS
PYT

Please take off your caps lock - it looks like you are SHOUTING.

Start here

ohhkk sorry

Where exactly (the full path) are you putting the library folders ?

C:\arduino-1.5.2-windows\arduino-1.5.2\libraries

this is the path.

Did you restart the IDE after installing the library?

yes i did.
i even restarted my system and the tried to open the sketch.,, but it shows the same error.

This is the Programming section, but you still haven't shown any code, or any links to the library you're having problems with.

this is the code which uses TMRpcm library.

#include <SD.h>                      // need to include the SD library
//#define SD_ChipSelectPin 53  //example uses hardware SS pin 53 on Mega2560
#define SD_ChipSelectPin 10  //using digital pin 4 on arduino nano 328
#include <TMRpcm.h>           //  also need to include this library...
 
TMRpcm tmrpcm;   // create an object for use in this sketch
char mychar;
 
void setup(){
 
  tmrpcm.speakerPin = 9; //11 on Mega, 9 on Uno, Nano, etc
 
  Serial.begin(9600);
  if (!SD.begin(SD_ChipSelectPin)) {  // see if the card is present and can be initialized:
    Serial.println("SD fail"); 
    return;   // don't do anything more if not
  }
  tmrpcm.play("beware.wav"); //the sound file "music" will play each time the arduino powers up, or is reset
}
 
 
 
void loop(){ 
 
  if(Serial.available()){  
    mychar = Serial.read();
     
    if(mychar == 'o'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("helpyou.wav");
    } else if(mychar == 'r'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("chortle.wav");
    } else if(mychar == 'q'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("helpyou.wav");
    } else if(mychar == 'p'){
      tmrpcm.play("beware.wav");
    }
    else if(mychar == 'w'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("impresiv.wav");
    }
    else if(mychar == 't'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("seekyoda.wav");
    }
    else if(mychar == 'y'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("sensefear.wav");
    }
    else if(mychar == 'u'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("strongami.wav");
    }
    else if(mychar == 'i'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("whyhere.wav");
    }
  }
 
}

and this is the error i am getting

sketch_jul26a:6: error: 'TMRpcm' does not name a type
sketch_jul26a.ino: In function 'void setup()':
sketch_jul26a:11: error: 'tmrpcm' was not declared in this scope
sketch_jul26a.ino: In function 'void loop()':
sketch_jul26a:29: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:31: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:33: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:35: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:38: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:41: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:44: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:47: error: 'tmrpcm' was not declared in this scope
sketch_jul26a:50: error: 'tmrpcm' was not declared in this scope

and this is the site from where i got the code and even the library

hii everyone,
i found out one more new thing ,,
that is whenever i open my ide and goes to "sketch>importlibrary>TMRpcmmaster"
and clicks on it ,, it show a blank on the sketch ,, but if i add any other library like motor or servo it shows the line as #include<motor.h>.
whereas if i import TMRpcm master library it just shows nothing.

pls pls pls help me with this pls pls

thanks in advance :slight_smile:

I just went to github, got the library and installed it,
started up Arduino 1.0, copied and pasted your code, set the board to "Uno", hit compile, and got this error message

Binary sketch size: 15660 bytes (of a 32256 byte maximum)

parthbhat13:
C:\arduino-1.5.2-windows\arduino-1.5.2\libraries

this is the path.

That is not the correct place. You are supposed to put it into the "libraries" folder inside your sketches folder.

http://arduino.cc/en/Guide/Libraries

What Arduino do you have? I would suggest downloading version 1.0.5 of the IDE unless you have a Due.

that is whenever i open my ide and goes to "sketch>importlibrary>TMRpcmmaster"

The library is "TMRpcm", not "TMRpcmmaster", surely?

i have arduino uno.
and as nick sir u said it was inside the libraries folder.
but after my frustration on my laptop.
i opened ide and then went to the sketchoption and in that i opened up the import library option.
i imported the library.
bt still i came up with the same error ,,
bt then i again deleted the folder and i imported the same library again with the same above mentioned procedure.
but this time i opened the tmrpcm-master named folder and again inside that there was a folder named tmrpcm.
this time i selected the folder named tmrpcm. and imported the libary.
and it worked.
now i really dont know how it worked,, was it due to the frustration which tapped my laptop for many times or elese it was some kind of my silly mistake.

and thanks a lott everyone for the help.
further again i think i would be having some issues when i start my project.
ill again bother you all ,, nick sir and awol sir.
thanks a lot for ur precious time. :slight_smile: :slight_smile: :slight_smile:

parthbhat13:
this time i opened the tmrpcm-master named folder and again inside that there was a folder named tmrpcm.
this time i selected the folder named tmrpcm. and imported the libary.

The folder named TMRpcm should be directly inside the libraries folder, and not nested inside another folder. This is probably why your initial attempts to import it failed.

Note that the libraries folder Nick referred to is within the folder where you save your sketches, not the folder where the Arduino software is installed.

yes i understood what wrong i was doing.
thx peterH :slight_smile: