hackAir-Arduino
hackAir-Arduino copied to clipboard
[Wemos.ino] Failing DHT measurement not handled
In the current version of Wemos.ino, a failing DHT humidity reading (this happens from time to time, or, there is simply no DHT sensor attached) is not handled.
The humidity compensation is conducted with a humidity value of NaN, which yields NaN. data.error is not updated and stays at 0.
The success of the DHT humidity reading should be checked, and no humidity compensation should be done when there is no valid humidity value available.