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 142f395 commit ced0804Copy full SHA for ced0804
adafruit_dht.py
@@ -214,6 +214,10 @@ def measure(self):
214
# check sum failed to validate
215
raise RuntimeError("Checksum did not validate. Try again.")
216
217
+ if new_humidity < 0 or new_humidity > 100:
218
+ # We received unplausible data
219
+ raise RuntimeError("Received unplausible data. Try again.")
220
+
221
elif len(pulses) >= 10:
222
# We got *some* data just not 81 bits
223
raise RuntimeError("A full buffer was not returned. Try again.")
0 commit comments