Hi,
Sorry to ask this question but I am struggling with my physical memory due medication I am taking and I can't remember what the following lines after the #include "SdFat.h" mean/do.
I am using the SdFat library and all has been well for a few months but yesterday the code is playing so I am trying to check it all out but my damn memory is bad today.
#include "SdFat.h"
SdFat sd;
SdFile file;
I am guessing they are variables or something.
Sorry to ask. Thanks
SdFat sd;
SdFile file;
Those lines are called constructors. They construct instances of SdFat and SdFile objects. So, yes, they create variables of the SdFat and SdFile types.
A File is an object. You can read or write to a file.
An SD is also an obhect. You can open a file that is on an SD.
The "Fat" part refers to the 'File Allocation Table" which is usually irrelevant to you. But it is very important to the writer of any SD card library. So that is how that library got its name.
Thanks for help both of you. Appreciate it.