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 1833318 commit e6880d7Copy full SHA for e6880d7
adafruit_dht.py
@@ -221,6 +221,10 @@ def measure(self):
221
# check sum failed to validate
222
raise RuntimeError("Checksum did not validate. Try again.")
223
224
+ if new_humidity < 0 or new_humidity > 100:
225
+ # We received unplausible data
226
+ raise RuntimeError("Received unplausible data. Try again.")
227
+
228
elif len(pulses) >= 10:
229
# We got *some* data just not 81 bits
230
raise RuntimeError("A full buffer was not returned. Try again.")
0 commit comments