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 (...
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. ...
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 ...
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.
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!
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sd.h × 15sd-card × 12
sd × 5
esp32 × 3
arduino-ide × 2
c++ × 2
arduino-uno × 1
serial × 1
esp8266 × 1
arduino-mega × 1
arduino-nano × 1
library × 1
spi × 1
gps × 1
json × 1
ssd1306 × 1