We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0413144 commit 57be0d5Copy full SHA for 57be0d5
examples/08.Strings/StringConstructors/StringConstructors.ino
@@ -66,6 +66,14 @@ void loop() {
66
// prints "123456" or whatever the value of millis() is:
67
Serial.println(stringOne);
68
69
+ //using a float and the right decimal places:
70
+ stringOne = String(5.698, 3);
71
+ Serial.println(stringOne);
72
+
73
+ //using a float and less decimal places to use rounding:
74
+ stringOne = String(5.698, 2);
75
76
77
// do nothing while true:
78
while (true);
79
0 commit comments