Input Devices

Week09

For reasons yet to uncover, the simplest of operations did not go through in Arduino: filling in my empirically calibrated values for sensor in the air = 799 and sensor in water = 424, thus following the guidelines offered on DFRobot website. The line const float intervals = (AirValue - WaterValue)/100; produces a value of 3.00; changing to const float intervals = (799 - 424)/100; does the exact same thing with the corresponding errors in RH calculation (Fig.01). Eventually, the values made sense after deleting the arithmetic operation completely and just entering the interval value manually: const float intervals = 3.75;. At least the 0%RH and 100%RH seemed to be reasonably defined.

Fig.01: Screenshot of erroneous interval output from arithmetic operation.