Closed
Description
Describe the current behavior
The Arduino IDE Serial Plotter accepts data in a delimiter-separated format. Each record is terminated by a line break.
Currently, the only line break recognized by the Arduino IDE 2.x Serial Plotter is CRLF (\r\n
).
The LF line ending is supported and officially specified as the line break character for the classic Arduino IDE Serial Plotter protocol:
End of message symbol \n
To reproduce
- Upload the following sketch to an Arduino board
void setup() { Serial.begin(9600); } void loop() { Serial.print(random(10)); Serial.print('\n'); }
- Open the Arduino IDE 2.x Serial Plotter.
- Select "9600 baud" from the dropdown baud rate menu at the bottom right corner of the "Serial Plotter" window.
😢 the data are not plotted.
- Close the Arduino IDE 2.x Serial Plotter.
- Open the classic Arduino IDE Serial Plotter.
- Select "9600 baud" from the dropdown baud rate menu at the bottom left corner of the "Serial Plotter" window.
🙂 the data are plotted.
Describe the request
Support LF in addition to CRLF line breaks in data sent to Serial Plotter.
Desktop
- OS: Windows 10
- Arduino IDE Version: 2.0.0-rc3-snapshot.35e5da5
Date: 2022-01-13T17:15:54.562Z
CLI Version: 0.20.2 [13783819]
Additional context
In addition to providing compatibility with the original protocol, there are several other reasons for supporting LF line breaks:
- "New Line" is the default line ending setting in the Arduino IDE Serial Monitor and Serial Plotter.
- A single character line break is more efficient, which can be an important consideration for resource constrained microcontrollers.
- Users may find LF line endings most intuitive since this is the standard line ending on both Linux and macOS, and even increasingly prevalent in code applications on Windows.