Welcome to monitor_printf Discussions! #1
tedtoal
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
👋 Welcome!
This is a GitHub discussion for my Arduino monitor_printf library repository.
The purpose of the library is to make it easy to do printfs to the serial monitor in the Arduino IDE.
The library has a .h/.cpp file pair that define C++ class monitor_printf, which contains a begin() function to initialize some things, and a printf() function which works not by hooking into a device putchar function but rather by simply using vsnprintf() to print into a buffer, then using Serial.write() to write the buffer to the serial monitor. The buffer size is automatically expanded when necessary to print a longer string.
The library creates a single global instance of the class named the_monitor_printf, and then it #defines 'monitor' to be equal to that name. The #define is skipped if the user defines DONT_DEFINE_monitor before #including the .h file.
Please:
Beta Was this translation helpful? Give feedback.
All reactions