@@ -11,6 +11,8 @@ long longValue1, longValue2;
1111bool boolValue1, boolValue2;
1212const char * charArray = " this is a string" ;
1313String stringValue1 = " this is a string" ;
14+ float floatValue;
15+ double doubleValue;
1416
1517void setup () {
1618 // Set up serial port and wait until connected
@@ -41,6 +43,8 @@ void loop() {
4143 longValue2 = random (100000000 );
4244 boolValue1 = random (2 )==0 ;
4345 boolValue2 = random (2 )==1 ;
46+ floatValue = 12.34 ;
47+ doubleValue= 1234.56789 ;
4448
4549 Log.notice ( " Log as Info with integer values : %d, %d" CR , intValue1, intValue2);
4650 Log.notice (F (" Log as Info with hex values : %x, %X" CR ), intValue1, intValue1);
@@ -51,12 +55,16 @@ void loop() {
5155 Log.notice ( " Log as Info with bool values : %t, %T" CR , boolValue1, boolValue2);
5256 Log.notice (F (" Log as Info with string value : %s" CR ), charArray);
5357 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);
5462 Log.notice (F (" Log as Debug with mixed values : %d, %d, %l, %l, %t, %T" CR ), intValue1 , intValue2,
5563 longValue1, longValue2, boolValue1, boolValue2);
5664 Log.trace ( " Log as Trace with bool value : %T" CR , boolValue1);
5765 Log.warning ( " Log as Warning with bool value : %T" CR , boolValue1);
5866 Log.error ( " Log as Error with bool value : %T" CR , boolValue1);
5967 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);
6169 delay (5000 );
6270}
0 commit comments