I encountered a little problem when I decided to power off the sensor after reading the values in DHT22.read_array(). Adding
if self.powerPin is not None:
self.powerPin.value(0)
just before returning the value ended up in giving me a "sensor error" all the time.
I liked the approach to power off the sensor via a GPIO pin. However, delaying the start of the state machine by 100ms not enough, so I additionally increased the value from 100 to 200ms. Now the DHT11 responds correctly when trying the first time.
Thx for your lib, great work.
I encountered a little problem when I decided to power off the sensor after reading the values in DHT22.read_array(). Adding
just before returning the value ended up in giving me a "sensor error" all the time.
I liked the approach to power off the sensor via a GPIO pin. However, delaying the start of the state machine by 100ms not enough, so I additionally increased the value from 100 to 200ms. Now the DHT11 responds correctly when trying the first time.