SdFat Util. Library

Hi all,

feeling a bit stupid with my problem and suppose i just have a hanger and it'll be solved easy with some advise.

I've been trying to set up VS1053 Mp3 Shields on Arduino (geeetech) and can't really get the libraries properly installed.

With a sample code i need the SdFat as well as SdFatUtil.h Library.
I can't find the SdFatUtil.h as a individual library, nor does Arduino know that spec. If I look for other source as that one: Search · SdFatUtil.h · GitHub
The SdFatUtil.h sits within the utility folder of the SD but can't be embedded in the code somehow.

Any ideas? :o

Any ideas?

Yes.

The general ideal behind creating a util folder, and putting stuff in there, is so that the public stuff, file File::read() is isolated from the private stuff, like how File::read() actually works. That is, the read() method returns data from a buffer, if there is the required amount of data in the buffer, or it collects what remains in the buffer, and actually gets more data from the SD card, to have enough data to satisfy the request.

So, there is NOT a separate SDFatUtil library. The SdFat library has a utilities folder that contains stuff that implements the private side of SdFat.

What you REALLY need to do is post your code and the error messages that illustrate why you think you need another (non-existent) library.

Hi, thanks for your quick reply.
Makes total sense, what you’re saying.

So, lets start with the very simple sample code i found online here: Nr.20 - MP3 Shield | Funduino - Kits und Anleitungen für Arduino
(been using sparkfun mp3shields and wave shields before and never had that issue)

#include <SPI.h> // libraries
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>

SdFat sd; //SD Karte benennen
SFEMP3Shield MP3player; //MP3 Shield als „MP3Player benennen

int t=6000; //Der Wert für „t“ gibt im Code den zeitlichen Abstand zwischen dem Abspielen der Datei an.

void setup() {

if(!sd.begin(9, SPI_HALF_SPEED)) sd.initErrorHalt(); //SD Karte mit MP3 Dateien auslesen
if (!sd.chdir("/")) sd.errorHalt(“sd.chdir”);

MP3player.begin(); //MP3 Shield starten
MP3player.setVolume(10,10); //Die Lautstärke einstellen

}

void loop() {

MP3player.available();

MP3player.playTrack(1); //Das MP3 Shield spielt nun die MP3 Datei mit dem Namen „track001“. Bei einer Datei mit dem Namen „track002“ müsste eine „2“ anstelle der „1“ in diese Klammer.
delay(t); //Vorher festgelegte Pause
}

this is what i’m getting:
sketch_aug23a_testMP3.ino:3:23: fatal error: SdFatUtil.h: No such file or directory
#include <SdFatUtil.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.

i just removed the included library, so it does work somehow now.
logically, it doesn't makes sense to me. thanks anyways... was really confused earlier

logically, it doesn't makes sense to me.

Missing include files in early versions of the IDE (pre 1.0) were fatal errors.

Then someone got the stupid idea that missing include files were OK. So, from version 1.0 and on to some version, a missing include file did not even generate a warning.

At some point, that person got the message that missing include files were NOT OK, and the fatal error was restored.

If the library was developed during the "missing include files are OK" nonsense phase, that could explain why the code tried to include a file that didn't exist.

Since the code compiles without the #include statement that tries to include a non-existent file, the #include statement was clearly wrong.

Got Exactly the same problem! But when i try to remove the SdFatUtil.H i just get a whole bunch of another errors… dont want to post them again here but. https://forum.arduino.cc/index.php?topic=517154.0