Skip to content

Commit 2733b25

Browse files
committed
Fix documentation
1 parent d88867e commit 2733b25

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

adafruit_htu21d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HTU21D.git"
3939

4040
HUMIDITY = const(0xF5)
41+
"""Constant command used to measure humidity."""
4142
TEMPERATURE = const(0xF3)
43+
"""Constant command used to measure temperature."""
44+
4245
_RESET = const(0xFE)
4346
_WRITE_USER1 = const(0xE6)
4447
_READ_USER1 = const(0xE7)
@@ -63,6 +66,7 @@ def _crc(data):
6366
class HTU21D:
6467
"""
6568
A driver for the HTU21D-F temperature and humidity sensor.
69+
6670
:param i2c_bus: The I2C bus the device is connected to
6771
:param int address: (optional) The I2C address of the device. Defaults to :const:`0x40`
6872
@@ -147,6 +151,8 @@ def measurement(self, what):
147151
This can be useful if you want to start the measurement, but don't
148152
want the call to block until the measurement is ready -- for instance,
149153
when you are doing other things at the same time.
154+
155+
:param int what: What to measure, one of (`HUMIDITY`, `TEMPERATURE`).
150156
"""
151157
if what not in (HUMIDITY, TEMPERATURE):
152158
raise ValueError()

0 commit comments

Comments
 (0)