6
6
*/
7
7
8
8
9
- int intValue1 , intValue2;
10
- long longValue1, longValue2;
11
- bool boolValue1, boolValue2;
12
- char * charArray = " this is a string" ;
13
- String stringValue1 = " this is a string" ;
9
+ int intValue1 , intValue2;
10
+ long longValue1, longValue2;
11
+ bool boolValue1, boolValue2;
12
+ const char * charArray = " this is a string" ;
13
+ String stringValue1 = " this is a string" ;
14
14
15
15
void setup () {
16
16
// Set up serial port and wait until connected
@@ -27,9 +27,9 @@ void setup() {
27
27
28
28
// Start logging
29
29
30
- Log.notice (F (CR" ******************************************" CR)); // Info string with Newline
31
- Log.notice ( " *** Logging example " CR); // Info string in flash memory
32
- Log.notice (F (" ******************* " )); Log.notice (" *********************** " CR); // two info strings without newline
30
+ Log.notice (F (CR " ******************************************" CR)); // Info string with Newline
31
+ Log.notice ( " *** Logging example " CR); // Info string in flash memory
32
+ Log.notice (F (" ******************* " )); Log.notice (" *********************** " CR); // two info strings without newline
33
33
}
34
34
35
35
void loop () {
@@ -42,21 +42,21 @@ void loop() {
42
42
boolValue1 = random (2 )==0 ;
43
43
boolValue2 = random (2 )==1 ;
44
44
45
- Log.notice ( " Log as Info with integer values : %d, %d" CR , intValue1, intValue2);
46
- Log.notice (F (" Log as Info with hex values : %x, %X" CR ), intValue1, intValue1);
47
- Log.notice ( " Log as Info with hex values : %x, %X" CR , intValue2, intValue2);
48
- Log.notice (F (" Log as Info with binary values : %b, %B" CR ), intValue1, intValue1);
49
- Log.notice ( " Log as Info with binary values : %b, %B" CR , intValue2, intValue2);
50
- Log.notice (F (" Log as Info with long values : %l, %l" CR ), longValue1, longValue2);
51
- Log.notice ( " Log as Info with bool values : %t, %T" CR , boolValue1, boolValue2);
52
- Log.notice (F (" Log as Info with string value : %s" CR ), charArray);
53
- Log.notice ( " Log as Info with string value : %s" CR , stringValue1.c_str ());
54
- Log.notice (F (" Log as Debug with mixed values : %d, %d, %l, %l, %t, %T" CR ), intValue1 , intValue2,
45
+ Log.notice ( " Log as Info with integer values : %d, %d" CR , intValue1, intValue2);
46
+ Log.notice (F (" Log as Info with hex values : %x, %X" CR ), intValue1, intValue1);
47
+ Log.notice ( " Log as Info with hex values : %x, %X" CR , intValue2, intValue2);
48
+ Log.notice (F (" Log as Info with binary values : %b, %B" CR ), intValue1, intValue1);
49
+ Log.notice ( " Log as Info with binary values : %b, %B" CR , intValue2, intValue2);
50
+ Log.notice (F (" Log as Info with long values : %l, %l" CR ), longValue1, longValue2);
51
+ Log.notice ( " Log as Info with bool values : %t, %T" CR , boolValue1, boolValue2);
52
+ Log.notice (F (" Log as Info with string value : %s" CR ), charArray);
53
+ Log.notice ( " Log as Info with string value : %s" CR , stringValue1.c_str ());
54
+ Log.notice (F (" Log as Debug with mixed values : %d, %d, %l, %l, %t, %T" CR ), intValue1 , intValue2,
55
55
longValue1, longValue2, boolValue1, boolValue2);
56
- Log.trace ( " Log as Trace with bool value : %T" CR , boolValue1);
57
- Log.warning ( " Log as Warning with bool value : %T" CR , boolValue1);
58
- Log.error ( " Log as Error with bool value : %T" CR , boolValue1);
59
- Log.fatal ( " Log as Fatal with bool value : %T" CR , boolValue1);
60
- Log.verbose (F (" Log as Vebose with bool value : %T" CR CR CR ), boolValue2);
56
+ Log.trace ( " Log as Trace with bool value : %T" CR , boolValue1);
57
+ Log.warning ( " Log as Warning with bool value : %T" CR , boolValue1);
58
+ Log.error ( " Log as Error with bool value : %T" CR , boolValue1);
59
+ Log.fatal ( " Log as Fatal with bool value : %T" CR , boolValue1);
60
+ Log.verbose (F (" Log as Vebose with bool value : %T" CR CR CR ), boolValue2);
61
61
delay (5000 );
62
62
}
0 commit comments