Particle Printable Buffer Library

less than 1 minute read

Based on the code used internally by the Particle firmware for printing to String objects (see StringPrintableHelper in wiring/src/spark_wiring_string.cpp), I have written a small library that allows printing into a simple buffer. This avoids the reallocation of memory that occurs when using the String class.

The library is available on GitHub and I’ve published it to the Particle library list so you can add it through the IDE or by use particle library add printable-buffer using the CLI.

Updated: