-2

I need to have two independent arduino sd libraries so that I can modify one and have the other one intact. I struggle to do so. Does anyone know if this is even possible? What should be the path to properly do so?

I tried a lot of things but I always end up in a spot where I dont know what code is working and what is not. Last try I duplicated all the files and renambed all the functions to whatever"2" but couldn't make it work

Espada86
  • 57
  • 1
  • 1
  • 6

1 Answers1

1

If you want to use two SD card than instead of copying the whole library just create another instance of the class like

SDClass SD2;

Now you can call SD2.begin(CS_PIN_2) or any other function of the sd library.

Arslan
  • 134
  • 5