This is the first time im using this library and i cant seem to get it to compile, i keep getting this error
In file included from C:\Users\MohammadB\Desktop\Arduino Projects\audio (1)\audio (1).ino:1:
c:\Users\MohammadB\Documents\Arduino\libraries\TMRpcm/TMRpcm.h:95:32: error: 'SdFile' has not been declared
95 | unsigned long searchMainTags(SdFile xFile, char *datStr);
| ^~~~~~
I didnt write it, i got it from a video on youtube, multiple videos had similar code though, so I assumed it should work, here is the code:
#include <SD.h> // need to include the SD library
#define SD_ChipSelectPin 15 //pin10 for Arduino Pro Mini
#include <TMRpcm.h> // Lib to play wav file
#include <SPI.h>
TMRpcm tmrpcm; // create an object for use in this sketch
void setup(){
tmrpcm.speakerPin = 5; //pin 9 for Aduino Pro Mini , any pin with PWM fonction will work too
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
}
else{
Serial.println("SD ok");
}
tmrpcm.play("Audio1.wav"); //the sound file "music" will play each time the arduino powers up, or is reset
tmrpcm.volume(5); //default volume to 2
}
void loop(){
}