Is this a trick question ?
Do you mean 'How the * should I know?'. Was just hoping there might be an obvious way, different to my approach, to speed up the reading of each file on the card
It's currently taking 54ms to open,read, then close each (1024byte) file. This equates to a maximum of 18fps before any further time spent processing.
I came across http://code.google.com/p/fat16lib/
which is an optimised sd library but it only supports fat16 standard sd cards and I don't have one to test. Any idea if this would speed up file opening and reading times?
Using hex instead of csv takes 2/3 of the time, but if there is no delimiter, how do I read in values less than 0xF? ie where there is only one digit... Can I just write 00 rather than 0 in the text file?
Thanks for your optimised filename code. I wasn't sure how to do it with chars. It's way better!
edit- also, how do I convert a char with a value of (for example) 'FF' into an int with a value of 255?