diff --git a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino index 315d0b64614..30ac20cddc3 100644 --- a/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino +++ b/build/shared/examples/08.Strings/StringConstructors/StringConstructors.ino @@ -66,6 +66,14 @@ void loop() { // prints "123456" or whatever the value of millis() is: Serial.println(stringOne); + //using a float and the right decimal places: + stringOne = String(5.698, 3); + Serial.println(stringOne); + + //using a float and less decimal places to use rounding: + stringOne = String(5.698, 2); + Serial.println(stringOne); + // do nothing while true: while (true);