Go Down

Topic: obsolete SD library documentation. (Read 795 times) previous topic - next topic

thatdude624

apparently arduino 1.0 supports multiple files, however pages like http://arduino.cc/en/Reference/SDopen still say
Quote
Note: only one file can be open at a time.
just saying. I think to open multiple files you make more SD objects (correct? I have no idea, of course, this is a guess)  but it mentions this no-where (as far as I checked), not in examples either. I only found this in the release notes, the blog, and the "home page" of the SD library documentation.

sorry if I somehow anger admins again like I did in my previous topic, were I thought the problem of an incorrect image was easy to understand, I was wrong. I tried to make this as easy to understand as possible, to avoid more pointless arguments. thanks!

Bob Pigford

Hello.
I, too, struggled with this issue (SD library documentation not up to date with latest release of Arduino 1.00).
After much trial and error, I found that, in the beginning of one's program, one simply needs to declare another file to exist.  For example, I used:
Code: [Select]

File myFile;
File myFile2;

Then just go about opening, closing, writing, reading, etc. each File in the normal way independent of the other. 
I have tried this for just 2 files to be open at the same time. Worked great.  I don't know how many FIles can be declared before Arduino complains.
Good luck!
     Bob

Go Up