I have a bunch of MP3 files on my SD card. using the standard SD library the file names appear as MAROON~1.MP3 , MAROON~2.MP3 ect. Professor google says to use FatFs. adding FatFS produces the error: fatal error: ffconf.h: No such file or directory. I edited the ffconf_template changing only FF_CODE_PAGE 437.
new error is:
WARNING: library FatFs claims to run on stm32 architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c: In function 'SD_CheckStatus':
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c:80:31: error: 'MSD_OK' undeclared (first use in this function); did you mean 'RES_OK'?
if(BSP_SD_GetCardState() == MSD_OK)
^~~~~~
RES_OK
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c:80:31: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c: In function 'SD_initialize':
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c:98:23: error: 'MSD_OK' undeclared (first use in this function); did you mean 'RES_OK'?
if(BSP_SD_Init() == MSD_OK)
^~~~~~
RES_OK
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c: In function 'SD_read':
C:\Users\XXXX\Documents\Arduino\libraries\FatFs\src\drivers\sd_diskio.c:134:46: error: 'MSD_OK' undeclared (first use in this function); did you mean 'RES_OK'?
count, SD_TIMEOUT) == MSD_OK)
^~~~~~
RES_OK
exit status 1
Compilation error: exit status 1
does anyone have a working copy of FatFS???
thanks in advance
I moved your topic to an appropriate forum category @KimBrussow.
In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
... I've never used an SD card with the Arduino, but you don't have BIOS, an operating system, or a regular file system like a computer... It's limited...
You MIGHT have to re-name your files and folders using an 8.3 system but I don't know.
Is that true? You're on an "regular Arduino" with an AVR chip?
I don't think a regular Arduino can decode MP3s either... Most people use an "audio shield" with MP3 capability, but those usually have limited file access too, and the Arduino can't directly access the SD card on the audio shield.
Another option for playing MP3s is the Raspberry Pi, which is a single board computer with a full operating system & file system.
After a ton of digging I found the solution: instead of using FatFs use SdFat. No issue on compile no missing .h files. I am using a Mega 2560 connections are pins:
5v -- 5v :: cs -- 53 :: mosi -- 51
sck -- 52 ::miso -- 50 ::gnd -- gnd.
returned file names are now:
Maroon 5 - Moves Like Jagger ft. Christina Aguilera (Official Music Video).mp3
Maroon 5 - Sugar (Lyrics).mp3
Maroon 5 - Girls Like You ft. Cardi B (Official Music Video).mp3
Nickelback - How You Remind Me [OFFICIAL VIDEO].mp3
Nickelback - Savin' Me.mp3
Rockstar.mp3