Sponge Bob
Sponge Bob

Reputation: 1621

Start new line with serial communication

I am trying to get an arduino to tell my computer what the state of it's relays is. And for some reason every time it sends a new string PuTTY leaves the horizontal position of the last text. This makes for a very ugly display.

I would like PuTTY to look like the arduino serial manager.

Here is what it looks like from the arduino serial manager enter image description here

This is what it looks like in PuTTY enter image description here

This is the code I am using to send to computer from arduino. enter image description here

Upvotes: 4

Views: 37700

Answers (3)

kblomqvist
kblomqvist

Reputation: 177

You could have set Implicit CR in every LF option from PuTTY's terminal options instead of changing every line termination in your code from \n to \r\n.

Upvotes: 9

Andrew
Andrew

Reputation: 334

Probably you should use "\r\n" instead of "\n" at the end of lines.

Upvotes: 8

user529758
user529758

Reputation:

Send \r\n instead of \n only as end-of-line marker. A lot of terminals (incl. Putty, Minicom) require it.

Upvotes: 2

Related Questions