Char Problem SD Card


I have a problem with my sketch. I read a text from the SD card. Library is SD.h

When I use Serial.print I always get that what I want (say 10 sec) all letters in a new line. This is what I get:

s a y

1 0

s e c

But I want it like this: say 10 sec And I have to use Serial.print and not Serial.write. How can I convert it that the format will be correct?

This is the part of my sketch:

myFile ="test.txt"); if (myFile) { Serial.println("test.txt:");

// read from the file until there's nothing else in it: while (myFile.available()) { Str1 =; Serial.println(Str1);

} // close the file: myFile.close();

Perhaps you should research the difference between Serial.print() and Serial.println().

Str1 is a stupid name for a character variable. That's like using

int float1;