I have searched the internet high and low - both on SparkFun’s product documentation, the connection guide, the GitHub repo (and it’s Wiki), Arduino forums, this forum, etc. I can’t find any answer to the question:
What happens when the SD card is filled?
My assumption is that OpenLog will just stop logging data. Is that true?
Nothing in the docs anywhere talks about it creating any sort of rotation with various files and deleting the oldest ones to make room for new ones, etc. so I assume that feature is not present.
We need to be able to log for weeks/months at a time where our SD card will get filled in about 20 days
So I think we’ll need to add some sort of log file rotation feature or something.
*Brian
Hi Brian.
We’ve never tried logging data to a full card, I would imagine the OpenLog will throw some sort of error and stop logging but it’s possible it might start overwriting the last entry or simply continue logging data to nowhere. I’m not exactly sure how the SDFAT libraries handle that sort of thing. As far as I can tell, the OpenLog doesn’t check to see how full a card is, it just assumes you have enough free space to continue logging.
Cool, thanks for the super fast response TS-Chris. At least it’s confirmation that we’ll have to solve this problem another way. I would throw this in an issue on the OpenLog GH site, but I know there’s no extra room for more features in the firmware right now as it is, so not much point.
*Brian