UTFT_tinyFAT modification to use SdFat

I'm trying to modify the UTFT_tinyFAT lib to use SdFat. The only function in this lib is loadBitmap. I've attached the mod'ed .h and .cpp files, and the originals. It works, but only for a seemingly random number of times, then stops loading. The sketch doesn't crash; it just returns from the loadBitmap function. I can't use tinyFAT with this sketch because the card has too many files for the root directory. Could someone look at the .cpp (which is probably where the problem is) and see what I did wrong? Thanks.

UTFT_SdFat.cpp (2.54 KB)

UTFT_SdFat.h (1.22 KB)

UTFT_tinyFAT.cpp (2.63 KB)

UTFT_tinyFAT.h (1.21 KB)

Hi,
Did you manage to make it work?
I'm coding a program that must have directories on the SD card and some images to be loaded on the LCD and your mod would be perfect.
Sorry that I could not help... I'm not that good programing :stuck_out_tongue:

Arthur

Yes, curiously enough it was a hardware problem. I changed to another brand of SD card and it works perfectly. I don't use the library, though; just put the needed functions on another tab in the sketch. I'll attach that tab. Remember to init UTFT, SdFat, and Sdfile on the main page, and check the UTFT docs for the proper parameters for your card. Good luck.

SD.ino (4.18 KB)

Thank you!!!
I'll dig into that :wink: