@@ -11,6 +11,8 @@ long longValue1, longValue2;
11
11
bool boolValue1, boolValue2;
12
12
const char * charArray = " this is a string" ;
13
13
String stringValue1 = " this is a string" ;
14
+ float floatValue;
15
+ double doubleValue;
14
16
15
17
void setup () {
16
18
// Set up serial port and wait until connected
@@ -41,6 +43,8 @@ void loop() {
41
43
longValue2 = random (100000000 );
42
44
boolValue1 = random (2 )==0 ;
43
45
boolValue2 = random (2 )==1 ;
46
+ floatValue = 12.34 ;
47
+ doubleValue= 1234.56789 ;
44
48
45
49
Log.notice ( " Log as Info with integer values : %d, %d" CR , intValue1, intValue2);
46
50
Log.notice (F (" Log as Info with hex values : %x, %X" CR ), intValue1, intValue1);
@@ -51,12 +55,16 @@ void loop() {
51
55
Log.notice ( " Log as Info with bool values : %t, %T" CR , boolValue1, boolValue2);
52
56
Log.notice (F (" Log as Info with string value : %s" CR ), charArray);
53
57
Log.notice ( " Log as Info with string value : %s" CR , stringValue1.c_str ());
58
+ Log.notice (F (" Log as Info with float value : %F" CR ), floatValue);
59
+ Log.notice ( " Log as Info with float value : %F" CR , floatValue);
60
+ Log.notice (F (" Log as Info with double value : %D" CR ), doubleValue);
61
+ Log.notice ( " Log as Info with double value : %D" CR , doubleValue);
54
62
Log.notice (F (" Log as Debug with mixed values : %d, %d, %l, %l, %t, %T" CR ), intValue1 , intValue2,
55
63
longValue1, longValue2, boolValue1, boolValue2);
56
64
Log.trace ( " Log as Trace with bool value : %T" CR , boolValue1);
57
65
Log.warning ( " Log as Warning with bool value : %T" CR , boolValue1);
58
66
Log.error ( " Log as Error with bool value : %T" CR , boolValue1);
59
67
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);
68
+ Log.verbose (F (" Log as Verbose with bool value : %T" CR CR CR ), boolValue2);
61
69
delay (5000 );
62
70
}
0 commit comments