Hey everyone,
If you’ve been in the Arduino ecosystem for a while, you’re likely familiar with Mikal Hart’s excellent Streaming.h library. It was a game-changer for cleaning up messy Serial.print() lines by bringing C++ << syntax to Arduino. As great of a library as it is, I started seeing its limitations.
The "Stateless" Nightmare
The Issue (Streaming.h): Formatting not only doesn’t follow the same syntax standard as C++, it’s also not persistent. If you want to print five floating-point numbers with 3 decimal places, you must wrap every single variable individually:
Serial << _FLOAT(v1, 3) << " " << _FLOAT(v2, 3) << " " << _FLOAT(v3, 3);
Which can become as redundant as typing out Serial.print() every time. Creating formatted logs became incredibly tedious to write and hard to read.
The NeoStreaming Fix: Introduces State Persistence. You set the state once, and it applies to everything that follows.
cout << setprecision(3) << v1 << " " << v2 << " " << v3;
No Native Time Formatting
The Issue (Streaming.h): There is no support for standard C struct tm timestamp formatting.
To print a timestamp from an RTC, you must manually chain together variables:
Serial << year << "-" << month << "-" << day << " " << hour << ":" << minute;
The NeoStreaming Fix: Includes put_time(). It securely formats the entire timestamp inside a bounded stack array using standard %Y-%m-%d %H:%M:%S sequences.
Summary
NeoStreaming.h is a true formatting engine. It intercepts the data, formats it into strict column widths, calculates precision, handles scientific notation, and parses timestamps all inside deterministic, zero-heap stack boundaries before handing it off to the serial port.
Feedback
I encourage you guys to give honest feedback.
You can download it from GitHub, or add it using the Arduino Library Manager.