-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
43 lines (27 loc) · 966 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Dbg library for Arduino
Version 1.0
by Byron Guernsey
contact: [email protected]
See the online documentation here: http://code.google.com/p/arduino-library-dbg/
See Dbg/examples/ directory for examples
Installation:
- Copy the Dbg/ directory and all contents to your Arduino/libraries/ directory
- On Mac OSX this is ~/Documents/Arduino/libraries
- On other systems its the directory containing your sketches
- You may need to create the libraries/ subdirectory if it does not exist
- Restart Arduino IDE to pick up new libraries
Simple usage:
#include <Dbg.h>
int port = 1; // 1 = Serial, [Mega: 2 = Serial1, 3 = Serial2, 4 = Serial3 ]
int speed = 9600;
void setup() {
Debug.begin(port, speed);
Debug.log("Long form logging");
dbg("Short form logging");
dbg("Port: %d Speed: %d", port, speed);
dbg("Inserting a %s is %s", "string", "easy");
}
...
Future changes may include:
- Log levels
- Fix for eliminating all dbg code with a macro