Skip to content

Commit 9ecdce6

Browse files
authored
Merge pull request #5 from mshannon78660/master
Modified unpack for temperature sensor value to use unsigned short in…
2 parents 8e0fea8 + eb89a5d commit 9ecdce6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_shtc3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def measurements(self):
195195
# decode data into human values:
196196
# convert bytes into 16-bit signed integer
197197
# convert the LSB value to a human value according to the datasheet
198-
raw_temp = unpack_from(">h", temp_data)[0]
198+
raw_temp = unpack_from(">H", temp_data)[0]
199199
raw_temp = ((4375 * raw_temp) >> 14) - 4500
200200
temperature = raw_temp / 100.0
201201

0 commit comments

Comments
 (0)