GY-63_MS5611/libraries/PrintSize
2021-01-29 12:31:58 +01:00
..
.github/workflows 2021-01-29 2021-01-29 12:31:58 +01:00
examples 2021-01-29 2021-01-29 12:31:58 +01:00
test 2021-01-29 2021-01-29 12:31:58 +01:00
.arduino-ci.yml 2021-01-29 2021-01-29 12:31:58 +01:00
keywords.txt 2021-01-29 2021-01-29 12:31:58 +01:00
library.json 2021-01-29 2021-01-29 12:31:58 +01:00
library.properties 2021-01-29 2021-01-29 12:31:58 +01:00
LICENSE 2021-01-29 2021-01-29 12:31:58 +01:00
PrintSize.h 2021-01-29 2021-01-29 12:31:58 +01:00
readme.md 2021-01-29 2021-01-29 12:31:58 +01:00

Arduino CI License: MIT GitHub release

PrintSize

Arduino library to determine the length of print statements

Description

PrintSize is a minimal library to determine the length of a variable when printed. This includes printing of floats, integers in decimal or hex notation.

Works for print(), println() and if supported printf() e.g. ESP32.

Finally since 0.2.0 it has a total counter to add up the characters "printed" since the last reset() call. (see example)

Operational

Example shows the right alignment of 10 random numbers

Example shows (elementary) line fitting

Can be used to calculate the needed space.

  • to properly do a right alignment e.g. for numbers or variable text
  • do left alignement and overwrite previous output with just enough spaces.
  • centering of numbers
  • see if output will fit into a line / display