Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 476
Sponge Bob Avatar asked Nov 30 '22 23:11

Sponge Bob


2 Answers

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.

like image 164
kblomqvist Avatar answered Dec 05 '22 10:12

kblomqvist


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

like image 43
Andrew Avatar answered Dec 05 '22 09:12

Andrew