Can someone please tell me how people manage to overwrie lines with new sensor info instead of it always printing a new line??
They don't use the Serial monitor, instead they use a terminal emulator that understands carriage return.
stuwilson:
Can someone please tell me how people manage to overwrie lines with new sensor info instead of it always printing a new line??
They are using a "serial terminal software" instead of Arduinos "serial monitor".
Those terminal software programs can understand control sequences to control cursor position, colors and more, like those used in the VT52 terminal which was on the market in the 70s of the last century.
The same VT52 control codes are supported until nowadays in serial terminal software like "Putty" or "RealTerm" and many more. And you can easily send control codes to position the cursor in a line/row, then print the value.
Unfortunately, the simple "serial monitor" provided by the Arduino IDE doesn't support VT52 control codes, so you need a different terminal software.
got it. Thanks!
Even though you cannot overwrite something already printed in the Serial monitor you can sometimes do yourself a favour and only print when a value has changed and/or print values in columns across the screen and only do a CR/LF when a certain number of values have been printed. Both methods prevent the Serial monitor being flooded with output and allow time to view and understand the values being shown.