From e561725f97c9d2f3b4956e2b6d8c1d57741932f2 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 13 Nov 2024 15:16:21 -0600 Subject: [PATCH 1/2] read decimal value also --- adafruit_dht.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_dht.py b/adafruit_dht.py index d4d869a..5c6f882 100644 --- a/adafruit_dht.py +++ b/adafruit_dht.py @@ -235,8 +235,8 @@ def measure(self) -> None: if self._dht11: # humidity is 1 byte new_humidity = buf[0] - # temperature is 1 byte - new_temperature = buf[2] + # temperature is 1 byte for integral and 1 byte for 1st decimal place + new_temperature = buf[2] + (buf[3] & 0x0F) / 10 else: # humidity is 2 bytes new_humidity = ((buf[0] << 8) | buf[1]) / 10 From eb53bb1f10b094044e64dbea1f1417e5b533fba4 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 14 Jan 2025 11:32:34 -0600 Subject: [PATCH 2/2] add sphinx configuration to rtd.yaml Signed-off-by: foamyguy --- .readthedocs.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 33c2a61..88bca9f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,6 +8,9 @@ # Required version: 2 +sphinx: + configuration: docs/conf.py + build: os: ubuntu-20.04 tools: