I would like to improve my sketch and learn how to load these values from an SD card so anyone can update the TXT file on the SD card and have it load that data into the program at setup. I believe the smartest was to do this is as a CSV.
I can follow other posts with how to loop through this CSV on my SD card and print it to the serial monitor; however I am a bit lost of how to read it into an array. First I believe I would setup to arrays char hexVal[100][25] (up to 100 values, constant 24 char length + EOL) and then char hexID[100][] (variable length).
I'm getting a bit lost in the conversations about strings being bad. I think I want to read it char by char until I hit an EOL or EOF. If someone could give me a nudge in the right direction that would be really very helpful.
On which Arduino? 2500 bytes won't fit in the SRAM for most Arduinos.
I believe the smartest was to do this is as a CSV.
I don't. The text ", Code 1" in that file adds no value. A fixed length record file would be much easier to read.
I'm getting a bit lost in the conversations about strings being bad.
No one, in ANY post on this form has said that strings are bad. Everyone that understands the limitations of the memory size on the Arduino says that Strings are bad. Strings and strings are NOT the same thing.
@PaulS, thanks for your time. Right now I only have 23 HEX values. I would like to support a minimum of 50 so that was just an example. I currently am running the Uno, but just ordered a Mega.
char hexVal[23][25] = {
Regarding the CSV, that was another example. I want to be able to have the user associated with the code. Eventually I would like to log activity so I wanted to have this in place for when I was able to move on to logging. The name would not have a fixed length.
ba322d387d980d74fc5d0d46, John
ba039b572f612e58d05a8c2d, Katie
979aeeb3ee35360a24d6190, Sandra
78cabc678dc0a503647cb05d, Tim
I have read quite a bit about avoiding String/string and that char was the way to go. Do you suggest that I should not be using char array here?