Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month 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
1 Answer
9 years, 1 month 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 );