Open kamocat opened 4 years ago
I added a function to reopen a file in #8 This doesn't actually detect when the SD card is removed, though. https://github.com/greiman/SdFat/issues/118
I noticed that the list directory function doesn't print anything once the SD card is removed. A simple option might be to create an empty hidden file and check for its existence every second. If it's not there, then we can try re-initializing the SD card. If that fails, of course, we probably want to disable the SD card logging.
We need the ability to recover from an SD being removed and reinserted. I would prefer this to be automatic. There are three scenarios that make this necessary: