Skip to content

Commit 1a638a0

Browse files
Adding an example to show debug level usage
1 parent 9b4cec5 commit 1a638a0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#define DEBUG_LEVEL DEBUG_LEVEL_INFO
2+
#include <Arduino_DebugUtils.h>
3+
4+
void setup() {
5+
Serial.begin(9600);
6+
Debug.timestampOn();
7+
Debug.debugLabelOn();
8+
Debug.setDebugLevel(DBG_ALL);
9+
}
10+
11+
int i = 0;
12+
13+
void loop() {
14+
DEBUG_ERROR("i = %d", i);
15+
DEBUG_WARNING("i = %d", i);
16+
DEBUG_INFO("i = %d", i);
17+
DEBUG_DEBUG("i = %d", i);
18+
DEBUG_VERBOSE("i = %d", i);
19+
20+
Serial.println();
21+
i++;
22+
delay(1000);
23+
}

0 commit comments

Comments
 (0)