What do ((no line ending, newline, carriage return & both NL + CR)) do?(monitor)

What do these do? (in the arduino's serial monitor)
so far i have yet to see any differences between them...

  • No line ending
  • Newline
  • Carriage return
  • Both NL + CR

They are options when sending stuff from the monitor to the arduino.

1 Like

yeah I know they are options...

but what do they do? When should I use each one?

They do what they say.
No line ending just sends what you put.
New line sends an ASCII new line code after what you put
Carafe return puts an ASCII carriage return character after what you put, and the last one puts both a carriage return and a new line character after whatbyou put.

1 Like

ohh like having an automatic end-of-phrase enter key pusher thingymagob?

Yes exactly.

Why doesn't Serial Monitor recognize \r and \n symbols if I send them directly after the message? It seems they are being interpreted as a text.

Can I somehow type a line ending manually, with the "no line ending" option selected at the bottom of the Serial Monitor, so that I know exactly what I'm sending?

This was a 4-years-dead thread - I haven't seen anyone resurrect one that old before.

You can have your Arduino program interpret what it receives from the Serial Monitor any way you want. So if it receives \n it can convert the 2 characters into a newline character - or into the text for a complete novel.
...R

1 Like

Je regrette such a blasphemy))
So, the behavior of "content\n" that I manually print into the Serial Monitor buffer, is not the same as received by the serial port (say, from another device using Serial.print("content\n")?
In the first case the SM would just print
"content\n",
and in the second case
"content
"
As I understand, manual printing into the SM (without additional coding for characters interpretation) always reads as a plain ASCII text, without string terminators or anything like that, right?
Thanks

If I understand your Reply #8 properly it is correct.

...R