Go Down

Topic: Issue using multiple SD cards and/or power-down mode (Read 2113 times) previous topic - next topic

noob314

For a SD logger, I need to use several SD cards. Previous (probably the latest as well) SD library had a problem to simply release it properly. There is begin(), however not end() method which would allow user to securely exchange SD cards, or even exchange it when device is in power-down sleep mode, which require that card be properly closed and ejected.

In order to fix this, I have added end() method which will close and release the class  instance and that worked fine. However, the problem is whenever new release of arduino software is installed or updated, these updated  code will gone and every time original SD class code need to be altered, which may be quite difficult due time.

In order to avoid all upper, I have tried to copy original SD library out and save in user library, however then there is a problem with duplicated libraries with different versions of arduino software, make quite a problem as well.

Is there any chance to fix all this generically?

ShermanP

I think there is an Adafruit version of the SD library which has the end() function.  It seems you should be able to put this in your Sketchbook, and it would take precedence over the official library.

noob314

I have installed and tested latest version of Arduino software, It seems that "user library" have a priority now if the classes and filenames are the same with "official one". With my modification copied all works as intended.

Thank you very much!

Go Up