Converting float to string

Post here first, or if you can't find a relevant section!
Post Reply
koen
Posts: 4
Joined: Mon May 18, 2020 8:42 am

Converting float to string

Post 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().
Post Reply

Return to “General discussion”