Teensy 3.6: Standard SD or SdFat library?

Status
Not open for further replies.

Bullone

Well-known member
Hi guys,
I'm porting my Arduino MEGA project to the Teensy v3.6 board and on Arduino I've used SdFat library beacuse it seems much fast and light than the SD lib...
What about SD lib on Teensy 3.6? Do you suggest me to use SD or SdFat lib?
If SdFat is the best way... which pin have I to use in the begin method?
 
I'm coding a small shell utility and soon switched from SD to SdFat without problems... On teensy you only have to

#include <SdFat.h>

and declare variables as

Sd2Card card;
SdFatSdio sd;

Then no pin on begin

Code:
if (!sd.begin()) {
            term->println("sd begin error");
        }
 
Thanks!

What is the best why with SdFat to remove all the files in a specific folder?
Is it possible to retrieve the newes file contained in a folder considering that the file has been created with the date like 20190509121300.log?
 
SdFat provides all the call needed to iterate a directory, and for each entry you can check its type (file or dir) and its attributes (date, etc) then decide to delete the file or not - But you have to write the code for this yourself, have a look at the examples...
 
Status
Not open for further replies.
Back
Top