1
Microcontrollers / Re: SD Card reliability in SPI mode
« Last post by TizianoHV on Today at 07:54:59 am »I've used a 2GB Kentron and a 8GB Kingston micro SD card + SdFat for my datalogger (Arduino nano every).
I wrote into the same cards for weeks, 50 times per second (2kBytes/s), multiple times without any issue.
Maybe smaller cards are better for such applications?
I wrote into the same cards for weeks, 50 times per second (2kBytes/s), multiple times without any issue.
Maybe smaller cards are better for such applications?
Code: [Select]
...
dataFile = SD.open(filename, O_CREAT | O_APPEND | O_WRITE); //Open file only once
...
while...{
...
dataFile.println(dataString);
SDbuffCount++;
if(SDbuffCount > SDbuffDim){
dataFile.flush(); //Flush, up to 5 times per seconds
SDbuffCount = 0;
}
}
dataFile.close();