2386Views3Replies

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.

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
iceng
iceng

7 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

0
pianoman99a
pianoman99a

Answer 7 years ago

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