Skip to content

Commit f57ddf6

Browse files
authored
Merge pull request #15 from jerryneedell/jerryn_fix_hum
fix humidity calculation error
2 parents 10c0a43 + babd465 commit f57ddf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_sht31d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def _data(self):
217217
humidity = [None] * (length//2)
218218
for i in range(length//2):
219219
temperature[i] = -45 + (175 * (word[i*2] / 65535))
220-
humidity[i] = 100 * (word[(i*2)+1] / 65523)
220+
humidity[i] = 100 * (word[(i*2)+1] / 65535)
221221
if (len(temperature) == 1) and (len(humidity) == 1):
222222
return temperature[0], humidity[0]
223223
return temperature, humidity

0 commit comments

Comments
 (0)