Storing an Int Array on Micro SD Card.

Hey Team!

I’m currently working on an interactive installation, and basically I need to store an array of int’s on an SD Card, just in case the Arduino crashes.

The int’s of the array will either be of value 0, 1, 2 or 3.

It needs to be able to read/write the array from the SD Card.

Does anyone know of any examples that do this, or could point me in the right direction? It would be much appreciated :slight_smile:

-Dylan

There is a library EEPROMWriteAnything that uses templates to break up any type of data into individual bytes, so you can write it, and read back from, EEPROM.

http://arduino.cc/playground/Code/EEPROMWriteAnything

You could use the technique (modified a bit) to write to, and read back from, the SD card.

The int's of the array will either be of value 0, 1, 2 or 3.

So, the ints will all be byte sized. Tell us, again, why they need to be ints.