diff --git a/example_YF-B10_flow_sensor.ino b/example_YF-B10_flow_sensor.ino index 3cd4a96..d6ba4e9 100644 --- a/example_YF-B10_flow_sensor.ino +++ b/example_YF-B10_flow_sensor.ino @@ -67,7 +67,7 @@ void loop() // As we have a add operation we need to avoid the positive value when no pulse is found if (tmp > 0) { - flowRate = tmp / calibrationFactor + calibrationDifference; + flowRate = (tmp + calibrationDifference) / calibrationFactor; }else { flowRate = 0; }