Hot answers tagged

3 votes
Accepted

Random access to SD card using SD.h or another library (ESP32)

Solved! The solution was to migrate from the SD library to mySD, which seems to be a SdFat wrapper for ESP32. You can see in the file mySD.h that the FILE_WRITE mode is defined as: #define FILE_WRITE (...
AlexSp3's user avatar
  • 203
3 votes
Accepted

Editing a particular position in a file stored in SD card

The problem is that you are opening the file with FILE_WRITE. That is a combined macro that is made up of: #define FILE_WRITE (O_READ | O_WRITE | O_CREAT | O_APPEND) The key one there is O_APPEND. ...
Majenko's user avatar
  • 105k
2 votes
Accepted

How does one **get** attributes for SD files?

In the FAT filesystem the timestamps and other attributes are stored in the directory, not in the file. So you need to read the "file" that is the directory that contains the file you're interested ...
Majenko's user avatar
  • 105k
2 votes

How does one **get** attributes for SD files?

You need to get an SdFile object for your file then use the SdFile::dirEntry method to get the directory entry for the file. The directory entry (struct directoryEntry) has the timestamps.
Craig's user avatar
  • 2,120
2 votes

"SSD1306 allocation failed" when #include SD.h

I was able to make it all fit by using the text-only library for the OLED. SSD1306Ascii Library Much thanks to Majenko for explaining the problem and greiman for writing the library!
cds333's user avatar
  • 141
1 vote

Duplicate Arduino SD Library

If you want to use two SD card than instead of copying the whole library just create another instance of the class like SDClass SD2; Now you can call SD2.begin(CS_PIN_2) or any other function of the ...
Arslan's user avatar
  • 136
1 vote
Accepted

Is there a way to remove the 8.3 filename limitation on the SD.h library?

The 8.3 "limit" is not a "limit" that can be removed. It is how FAT filesystems work. Longer filenames are a "fudge" extension overlaid on top of that fileststem structure. To be able to use them you ...
Majenko's user avatar
  • 105k
1 vote

"SSD1306 allocation failed" when #include SD.h

Both the SD library and the SSD1306 libraries want big buffers. That means lots of memory. You don't have lots of memory. The SD wants at least 512 bytes for a sector buffer (which is allocated at ...
Majenko's user avatar
  • 105k
1 vote

Arduino SD count files and open last, How to?

Consider using the exist() method found in the SD.h library you already are including in your program. Assuming you will create no more than 99 files and the last file created will have the highest 2 ...
st2000's user avatar
  • 7,270

Only top scored, non community-wiki answers of a minimum length are eligible