confusing behavior...

Hi guys,
this is probably stupid, but I could not find consistent reply to my question by 30min of googling. function reads the input from Serial Monitor one byte after another when you
press enter, does it read the “enter” aka carriage return ‘/n’ ?

Using example from this page
it never gives the ASCII for ‘enter key’ nor it never reacts when you enter an empty line.

But lot of example code on the internet and even in libraries is checking condition == ‘/n’ which I seem to be unable to achieve.

Thank you for your input…

Open your Serial monitor. On the bottom right, left of baud rate, there is a box for the line ending that Serial monitor will send to Arduino when a line is sent. If the box says no line ending, '\n' will not be sent at the end of the line. Change to Newline and it will.

The serial monitor has a tab which lets you set the line ending, the options are none, nl ,cr lf.

Mark == '/n'

That should be '\n'