New answers tagged


You should not need to save the position, the file knows where you last read from. You'd only need to manually save such information if you close the file and re-open it again, which unless you have a good reason is actually a very wasteful operation. If you really do need to you can use the .position() and .seek() functions: Save the location: uint32_t pos =...


timestamp in rtcReadTime() is a local variable. When you return from that function it ceases to exist - so what you have returned is nothing. You can't print nothing, so the Arduino crashes. You either need to make the timestamp variable static so that it's not lost when you leave the function, make it a global variable, which has a similar effect, or pass a ...


I think maybe the problem comes from the SD module you use. I have used the SD module just like you.And I can not write or read data successfully. More seriousely, my card broken and the damage is permanent.This connect is the new SD module I use, and I use successfully. You can dry by yourself.


I wanted to write to 2 SD cards simultaniously with one Arduino Mega. Used all the relevant pins including CS on 53 for the first SD card and 13 for the second SD card. Can be any digital pin I think but this one makes the LED blink too). Before the SD.begin(13) of the second SD card I do a digitalWrite(53,HIGH). That de-selects the first SD card. and ...

Top 50 recent answers are included