Doing More with
This packet shows a few ways to get more out of the built-in Arduino commands
- Improved print formatting:
- The “Serial Console” embedded in the Arduino program doesn’t understand many
- formatting features that you might expect on a text console, such as “Clear Screen”,
- or “Move Cursor to Start of Line”. However, it does understand a few text formatting
- characters, and these can be used to align columns of data or to separate distinct
- blocks of data. A little text formatting goes a long way to making a more useable
- display output.
- Simplified coding:
Serial.print()can only print a single value, any sketch that needs to display
- 2, 3 or more values expand quickly. Long sketches are not only unwieldy but error
- prone. this packet shows how to streamline your code so that multiple values can
- be displayed with a single invocation of
Going Further ##
There are other ways to get much more flexibility in the output displayed
by your Arduino, e.g.:
Rather than the Serial Console built into the Arduino IDE, use an external
terminal emulator and thereby get more control over things like clearing
the screen or placing the cursor at a specified place. Some alternatives
are described by The Bald Engineer.
Get full control over print formatting by adding the
formatted print functions (i.e.
related functions) to the
“Last Edit: Nov 04, 2017, 04:24 am by krupsk” give links to recent work on this problem which makes using the formatted print
facilities much easier.