Name Date Size

..29-Nov-20194 KiB

.travis.ymlH A D29-Nov-20192.7 KiB

examples/Arduino_Debug_Basic/H29-Nov-20194 KiB

extras/H29-Nov-20194 KiB

keywords.txtH A D29-Nov-2019690

library.propertiesH A D29-Nov-2019382

LICENSEH A D29-Nov-201935.1 KiB

README.mdH A D29-Nov-20191.1 KiB

src/H29-Nov-20194 KiB

README.md

1Arduino_DebugUtils
2==================
3
4This class provides functionality useful for debugging sketches via `printf`-style statements.
5
6# How-To-Use Basic
7Arduino_DebugUtils has 6 different debug levels (described descending from highest to lowest priority):
8* `DBG_NONE` - no debug output is shown
9* `DBG_ERROR` - critical errors
10* `DBG_WARNING` - non-critical errors
11* `DBG_INFO` - information
12* `DBG_DEBUG` - more information
13* `DBG_VERBOSE` - most information
14
15The desired debug level can be set via `setDebugLevel(DBG_WARNING)`.
16
17Debug messages are written via `print` which supports `printf`-style formatted output.
18
19Example:
20```C++
21int i = 1;
22float pi = 3.1459;
23Debug.print(DBG_VERBOSE, "i = %d, pi = %f", i, pi);
24```
25
26If desired timestamps can be prefixed to the debug message. Timestamp output can be enabled and disabled via `timestampOn` and `timestampOff`.
27
28# How-To-Use Advanced
29Normally all debug output is redirected to the primary serial output of each board (`Serial`). In case you want to redirect the output to another output stream you can make use of `setDebugOutputStream(&Serial2)`.
30