Page 1 of 1

Converting float to string

Posted: Tue Nov 21, 2023 12:59 pm
by koen
FYI. FloatToString, a library to convert float to String.
  • small. about 2 to 3 kbyte.
  • Checks for buffer overflows
  • fast. Does not use float or double. It's all integer math and table lookups.
  • plain C, no dependencies
  • c++ wrapper for Arduino
If you're feeling adventurous, patches for print() and parseFloat() so you can read and write floats in scientific notation, like 65.43e21.
On bluepill/f103 the patch to parseFloat() actually decreases program size by 1900 bytes, compared to the standard Arduino parseFloat().