Go Down

Topic: TMRpcm with SdFat Errors (Read 238 times) previous topic - next topic

willb2

I'm unable to use TMRpcm.h to play .WAV files and SdFat.h for text file reads combined in the same sketch.  Each will compile independently.  I've made three suggested mods to pcmConfig.h with no meaningful results.  Error = "Error compiling for board Arduino/Genuino Uno." 

Anyone knowing of a 'fix' for this, I'd be most grateful.  Thank you.

Lucario448

Error = "Error compiling for board Arduino/Genuino Uno."
Better give us the whole message. That's usually the last line, so next time scroll up a little more.

willb2

Better give us the whole message. That's usually the last line, so next time scroll up a little more.
C:\Users\admin1\Documents\Arduino\libraries\SD\src/SD.h:62:3: error: 'SdVolume' does not name a type

   SdVolume volume;

   ^

C:\Users\admin1\Documents\Arduino\libraries\SD\src/SD.h:70:33: error: 'SD_CHIP_SELECT_PIN' was not declared in this scope

   boolean begin(uint8_t csPin = SD_CHIP_SELECT_PIN);

                                 ^

Multiple libraries were found for "SPI.h"
 Used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
 Not used: C:\Users\admin1\Documents\Arduino\libraries\SPI
Multiple libraries were found for "SD.h"
 Used: C:\Users\admin1\Documents\Arduino\libraries\SD
 Not used: C:\Program Files (x86)\Arduino\libraries\SD
Using library TMRpcm-1.1.0 at version 1.1 in folder: C:\Users\admin1\Documents\Arduino\libraries\TMRpcm-1.1.0
Using library SdFat at version 1.1.0 in folder: C:\Users\admin1\Documents\Arduino\libraries\SdFat
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library SD at version 1.2.3 in folder: C:\Users\admin1\Documents\Arduino\libraries\SD
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

Lucario448

Go to the library's folder, edit the file called pcmConfig.h by uncommenting this line:

Code: [Select]
#define SDFAT
Without it, the compiler will get confused because you're using SdFat while the library insists with the usual SD.
It's the result of including these libraries at the same time.

willb2

Thank you Lacario for replies and suggestion.  I have, however, already tried uncommenting the   #define SDFAT  and gotten the same compile (with errors) result.  Don't quite know now what to try next. 

willb2

Hi (again) Lucario
I do believe I may have solved my problem with grateful thanks to your suggestion. I read more critically pcmConfig.h  which suggest going to   https://github.com/TMRh20/TMRpcm/wiki.  Toward the bottom of that document under "Installation"  the current download is given as  https://github.com/TMRh20/TMRpcm/archive/master.zip  .  Installing from this site along with uncommenting the  #define SDFAT - my code compiled first go. 
The line just above this #define is quite obsolete, I'd say.

Again, I am most grateful for your assistance!
Will

Lucario448

The line just above this #define is quite obsolete, I'd say.
Ah yes, Google's repositories are either non-existent or outdated nowadays. Currently, almost all (up-to-date) Arduino libraries are hosted on GitHub.


And BTW... you're welcome! ;)

Go Up