Report
3 years, 7 months ago.

What's the "println" instruction equivalent?

Hi,

In C++ or Arduino, the command to display the output in unic line refreshed without output should be like:

println("x:  %.0f  | y: %.0f  | z: %.0f ", measX, measY, measZ );

In Mbed interface, this command works:

print("x:  %.0f  | y: %.0f  | z: %.0f ", measX, measY, measZ );

but the display is added after the older.

Quote:

y: 106 | z: 104 x: 117 | y: 104 | z: 104 x: 117 | y: 104 | z: 106 x: 117 | y: 104 | z: 104 x: 118 | y: 105 | z: 105 x: 117 | y: 105 | z: 102

How to have one line output.

Thanks

Comment on this question

1 Answer

3 years, 7 months ago.

You need to insert the end of line character sequence CR LF:

print("x:  %.0f  | y: %.0f  | z: %.0f\r\n", measX, measY, measZ );


To post an answer, please log in.