NewLinuxFan
Well-known member
Is there a way to do this besides saving a text file and reading back every digit, comma, brace, and bracket? I'm thinking of something like how PROGMEM arrays are stored and then read back during a sketch. I would like to convert a text file into something more efficient and store that on a micro SD card for a Teensy to read.
If nobody does it that way, and everyone is just storing their large arrays as text files on SD cards, I would be interested in seeing an example instead of re-inventing the wheel by coding it myself.
Please excuse me if this has been discussed in another thread. I searched and was not able to find it. Also searched the Arduino forum, and the closest thing I found is someone suggested using a similar method as this code but modifying it for SD cards instead of EEPROM:
http://playground.arduino.cc/Code/EEPROMWriteAnything
I'm a bit rusty on pointers and need to brush up on that subject to understand what it's doing, then figure out what the equivalent is on an SD card. Is this the best route to follow? I would imagine I'd have to code something in C language to run on a computer (something I have little knowledge of) to convert the text file. Any advice would be greatly appreciated.
If nobody does it that way, and everyone is just storing their large arrays as text files on SD cards, I would be interested in seeing an example instead of re-inventing the wheel by coding it myself.
Please excuse me if this has been discussed in another thread. I searched and was not able to find it. Also searched the Arduino forum, and the closest thing I found is someone suggested using a similar method as this code but modifying it for SD cards instead of EEPROM:
http://playground.arduino.cc/Code/EEPROMWriteAnything
I'm a bit rusty on pointers and need to brush up on that subject to understand what it's doing, then figure out what the equivalent is on an SD card. Is this the best route to follow? I would imagine I'd have to code something in C language to run on a computer (something I have little knowledge of) to convert the text file. Any advice would be greatly appreciated.