fredericplante / beta-lib

Automatically exported from code.google.com/p/beta-lib
0 stars 0 forks source link

Writing and Reading Integers from microSD card #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using the Write example and modifying it to write 3 numbers separated by 
commas
2. Using the Read example and adding a comma delimiter
3.

What is the expected output? What do you see instead?
I'm trying to figure out how to write 3 integer values on every line of the 
file and then reconstruct them to ints in my Arduino program. I was writing the 
3 comma separated integers on each line using writeNumber(int) followed by 
writeString(','). How should I convert the array of uint_8s back to an int as 
fast as possible? I'm running into problems because the number of digits can 
vary greatly. Also how should I go about precisely seeking to a particular line 
of the file? Do you have any examples of these available?

What version of the product are you using? On what operating system?
sdfatlib20100813
OSX 10.6.4

Please provide any additional information below.
I'm sending data from my mac through pyserial to arduino to the sdCard and 
reading the values wrote back into the arduino program.

Original issue reported on code.google.com by kevlarme...@gmail.com on 16 Aug 2010 at 3:01

GoogleCodeExporter commented 8 years ago
Sorry I missed this issue. This issue should have been posted on the sdfatlib 
issues page.

http://code.google.com/p/sdfatlib/issues/list

SdFat does not provide formatted input so you must write the read function.

Original comment by Bill.Gre...@gmail.com on 9 Jan 2011 at 3:07