2154Views3Replies

Author Options:

How can I read a txt file to a string on an Arduino? Answered

I have an Arduino combination SD and Ethernet shield.  I need to use them together, but the Ladyada tutorial does not work with my hardware.  Basically, I set up the web response to my client, then turn of the Wiznet chip, read the file, trn the Wiznet chip back on, and finish sending my response.  The problem is, I need to write the txt file to a temporary string so that I can turn the Wiznet chip back on and then write the data.  Any help?  Thanks in advance.

Discussions

0
user
iceng

4 years ago

Parse the text string into individual ASCII characters and
Save each characters as a 8 bit value in sequential memory locations
end the string by a "$" as a termination character.
Then simply output these ASCII characters in the same order sequence.

A

Thank you, but could I get a code example; I am pretty new to Arduino.