-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Serial Monitor doesn't recognize Carriage Return #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In the first communication example - Reading a serial ASCII-encoded string. is changeing the line |
yes this is a know problem with the Arduino IDE serial monitor. your problem is totally unrelated to the original issue, and it is probably better if you post such problems in the forum. In any case you are confusing the escape sequence \n (with the backslash) with the two-characters sequence /n (with the normal slash). '/n' is not an escape sequence but the concatenation of '/' and 'n' that are respectively 2F and 6E. This explains the numbers you're seeing (2F6E in various bases...), be sure to use '\n' instead. |
You are quite correct of course. I typed in the wrong string when trying to understand the problem. No line ending sends NO char (as you would expect) I do not know what ‘\n’ is interpreted as in the “ if ” statement but replacing it with “ int(‘\n’) ” Alan |
I apologize if I should not be bothering you. If you could tell me where I should address these thoughts I will do so. I have done more experimenting with the problem and converting the Serial.read() to a char by char test=(char)Serial.read(); does NOT work with “ Both NL and CR” but it DOES work in the Serial Event example There are two things that are different between the two instances 2 In the first program the test follows Serial.parseInt() Can you mix the two forms of working? Alan |
@AlanTJohnstone |
@gse76, as @cmaglie said, this is a know limitation of Serial Monitor, unlikely to be fixed. Serial Monitor is not a terminal and it's unable to properly handle a handful of control codes. Please use tools like putty or cutecom instead |
It's also cannot recognized on Linux screen serial monitor |
Duplicate of #346 |
With Arduino 1.0.3 the instruction "Serial.print('\r')" isn't displayed in the Serial Monitor. This instruction should return the carriage at the beginning of the current line in the terminal.
Using another terminal instead, such as Putty, this instruction works as expected.
I use it in order to display a single line updating (i.e.: to show a continuos changing sensor state)
The text was updated successfully, but these errors were encountered: