File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 38
38
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HTU21D.git"
39
39
40
40
HUMIDITY = const (0xF5 )
41
+ """Constant command used to measure humidity."""
41
42
TEMPERATURE = const (0xF3 )
43
+ """Constant command used to measure temperature."""
44
+
42
45
_RESET = const (0xFE )
43
46
_WRITE_USER1 = const (0xE6 )
44
47
_READ_USER1 = const (0xE7 )
@@ -63,6 +66,7 @@ def _crc(data):
63
66
class HTU21D :
64
67
"""
65
68
A driver for the HTU21D-F temperature and humidity sensor.
69
+
66
70
:param i2c_bus: The I2C bus the device is connected to
67
71
:param int address: (optional) The I2C address of the device. Defaults to :const:`0x40`
68
72
@@ -147,6 +151,8 @@ def measurement(self, what):
147
151
This can be useful if you want to start the measurement, but don't
148
152
want the call to block until the measurement is ready -- for instance,
149
153
when you are doing other things at the same time.
154
+
155
+ :param int what: What to measure, one of (`HUMIDITY`, `TEMPERATURE`).
150
156
"""
151
157
if what not in (HUMIDITY , TEMPERATURE ):
152
158
raise ValueError ()
You can’t perform that action at this time.
0 commit comments