From db71708a255c8aaaf44854c34ccaa56b3f260f91 Mon Sep 17 00:00:00 2001 From: siddacious Date: Mon, 6 Jul 2020 19:41:03 -0700 Subject: [PATCH] %rh doesn't go negative, yo --- adafruit_shtc3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_shtc3.py b/adafruit_shtc3.py index a0979c4..995ddb3 100644 --- a/adafruit_shtc3.py +++ b/adafruit_shtc3.py @@ -199,7 +199,7 @@ def measurements(self): temperature = raw_temp / 100.0 # repeat above steps for humidity data - raw_humidity = unpack_from(">h", humidity_data)[0] + raw_humidity = unpack_from(">H", humidity_data)[0] raw_humidity = (625 * raw_humidity) >> 12 humidity = raw_humidity / 100.0