diff --git a/EXAMPLES/Python/DHT11_SENSOR/dht11.py b/EXAMPLES/Python/DHT11_SENSOR/dht11.py index 455ad2a..98307b7 100644 --- a/EXAMPLES/Python/DHT11_SENSOR/dht11.py +++ b/EXAMPLES/Python/DHT11_SENSOR/dht11.py @@ -88,7 +88,7 @@ class DHT11(object): total = self.humidity + self.temperature # is checksum ok ? if not (total & 255) == self.checksum: - raise + raise ValueError("Checksum incorrect") elif 16 <= self.bit < 24: # in temperature byte self.temperature = (self.temperature << 1) + val elif 0 <= self.bit < 8: # in humidity byte