How to print to backspace character to serial monitor?

I want to print to the serial monitor (Shift-Cmd-M in the Arduino IDE) such that one line can be reused (no CRLF).

For example to print this line:

INPUT VALUE IS

and be able to print the numeric values after this text; the text remains the same.

And when the numeric value is updated it over-prints the previous numeric values (no scrolling list of output).

Is this possible with Arduino?

Does this require the use of backspace characters and other cursor-control characters?

Cheers.

Is this possible with Arduino?

Not using the Serial monitor. Consider using a terminal emulator that supports better cursor control instead.

I downloaded CoolTerm and installed it. I'm using Serial.print(12, HEX) to send the Form-Feed character to CT.

But Arduino is not sending hex 0C, it's sending ascii "C". CoolTerm lets you monitor received data in either ascii or hex. In the ascii window it shows "C" and in the hex window it shows "43".

So is this a bug in IDE? Or am I doing something wrong?

Thanks.

Arduino Diecimila (ATmega168)
IDE 1.6.1

12 in hex is OC. When you put "HEX" as the second argument, it means, "print this out in hex notation using ascii characters." So ascii 'C' is exactly what you should expect. You might want to use Serial.write(12) instead. I'm not sure if Serial.print((char)12); would do it or not.

Thanks DG!

Serial.write(12) works.

Cheers!

Sparkyy:
Thanks DG!

Serial.write(12) works.

Cheers!

or Serial.write(0xC), if you want to express it in hex.