Skip to content

Commit 3fdec88

Browse files
authored
Merge pull request #14 from uutzinger/master
Include delay until data is expected to be ready
2 parents d42c36e + afd8d06 commit 3fdec88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_htu21d.py

+2
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ def relative_humidity(self):
9797
"""The measured relative humidity in percent."""
9898
self.measurement(HUMIDITY)
9999
self._measurement = 0
100+
time.sleep(0.016)
100101
return self._data() * 125.0 / 65536.0 - 6.0
101102

102103
@property
103104
def temperature(self):
104105
"""The measured temperature in degrees Celcius."""
105106
self.measurement(TEMPERATURE)
106107
self._measurement = 0
108+
time.sleep(0.050)
107109
return self._data() * 175.72 / 65536.0 - 46.85
108110

109111
def measurement(self, what):

0 commit comments

Comments
 (0)