How to read text file line by line?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
wichbu
 
Posts: 5
Joined: Sun Feb 23, 2014 3:12 am

How to read text file line by line?

Post by wichbu »

What function can arduino UNO read each line in text file on a sd card?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: How to read text file line by line?

Post by adafruit_support_bill »

The SD library read() function reads one byte at a time. To read a whole line, you need to allocate a buffer and write code to fill it one character at a time. Here is an example:
http://forum.arduino.cc/index.php/topic,202099.0.html

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”