I have modified the trigger calculation. According to the Intenet there is a difference in the trigger time for the DHT11 and DHT22. This is take into account in the library in the Child classes with the parameter
class DHT11(DHTBase):
"""Support for DHT11 device.
:param ~board.Pin pin: digital pin used for communication
"""
def __init__(self, pin, use_pulseio=_USE_PULSEIO):
super().__init__(True, pin, 18000, use_pulseio)
class DHT22(DHTBase):
"""Support for DHT22 device.
:param ~board.Pin pin: digital pin used for communication
"""
def __init__(self, pin, use_pulseio=_USE_PULSEIO):
super().__init__(False, pin, 1000, use_pulseio)
However, this is not calculated for the Bitbang portion, and the time used is the time normally used for the DHT22 sensor.
Calculation when pulling the line down to start the lecture will be calculated according to the self._trig_waitparameter that depends on the sensor used
I have modified the trigger calculation. According to the Intenet there is a difference in the trigger time for the DHT11 and DHT22. This is take into account in the library in the Child classes with the parameter
However, this is not calculated for the Bitbang portion, and the time used is the time normally used for the DHT22 sensor.
Calculation when pulling the line down to start the lecture will be calculated according to the
self._trig_wait
parameter that depends on the sensor usedOld C library different time, maybe that is why for a lot of people this works better. (if interested see this https://github.com/jposada202020/DHT_Investigation)