-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
This is Issue 346 moved from a Google Code project.
Added by 2010-09-08T13:16:56.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium
Original description
What change would you like to see?
I would like this sketch:
void setup()
{
Serial.begin(57600);
Serial.print("Hi There!");
Serial.print("\r...");
Serial.print("\nThere!");
}to generate this output:
...There!
There!
rather than what we get today:
Hi There!
...
There!
That is CR should move to beginning of line and LF should advance to next line.
Why?
This allows for more flexible debug output. A trace value can be rewritten to the same line (Serial.print("\rValue=")) rather than print on a separate line.
Would this cause any incompatibilities with previous versions? If so, how
can these be mitigated?
Not likely. Serial.println uses the CR/LF pair for line endings and so would produce the same output as today. This is also inline with how CR/LF is defined and how most serial terminal emulators work.