From ef109723e43e999492fdf46d5e657a55505edfd9 Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sat, 13 Feb 2021 20:12:52 -0500 Subject: [PATCH 1/2] Change in the Bitbang Trigger calculation --- adafruit_dht.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_dht.py b/adafruit_dht.py index f6fee58..7a61d2f 100644 --- a/adafruit_dht.py +++ b/adafruit_dht.py @@ -138,7 +138,7 @@ def _get_pulses_bitbang(self): dhtpin.value = True time.sleep(0.1) dhtpin.value = False - time.sleep(0.001) + time.sleep(self._trig_wait // 1000000) # Using the time to pull-down the line according to DHT Model timestamp = time.monotonic() # take timestamp dhtval = True # start with dht pin true because its pulled up dhtpin.direction = Direction.INPUT From 85b6a367f9389f0b03b85e1399950c6b8872e40e Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sat, 13 Feb 2021 20:37:30 -0500 Subject: [PATCH 2/2] Pylint and black verification --- adafruit_dht.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_dht.py b/adafruit_dht.py index 7a61d2f..102e8e5 100644 --- a/adafruit_dht.py +++ b/adafruit_dht.py @@ -138,7 +138,8 @@ def _get_pulses_bitbang(self): dhtpin.value = True time.sleep(0.1) dhtpin.value = False - time.sleep(self._trig_wait // 1000000) # Using the time to pull-down the line according to DHT Model + # Using the time to pull-down the line according to DHT Model + time.sleep(self._trig_wait // 1000000) timestamp = time.monotonic() # take timestamp dhtval = True # start with dht pin true because its pulled up dhtpin.direction = Direction.INPUT