We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b82637 commit 7914fc4Copy full SHA for 7914fc4
examples/7_distance_and_light_sensor/7_distance_and_light_sensor.ino
@@ -38,6 +38,7 @@ void loop() {
38
39
distance = sensor.getDistance();
40
lo.addToPayload(distance); // adding 'distance' value to the current payload
41
+ // limiting value to 2 decimal places
42
ambient_light = (static_cast<int>(sensor.getAmbientLight(GAIN_1) * 100.0)) / 100.0;
43
lo.addToPayload(ambient_light);
44
0 commit comments