Skip to content

Commit

Permalink
Merge pull request #19 from Neradoc/fix-documentation
Browse files Browse the repository at this point in the history
Fix documentation
  • Loading branch information
tekktrik committed Mar 29, 2022
2 parents 6e1fd39 + 2733b25 commit c17dc57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions adafruit_htu21d.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HTU21D.git"

HUMIDITY = const(0xF5)
"""Constant command used to measure humidity."""
TEMPERATURE = const(0xF3)
"""Constant command used to measure temperature."""

_RESET = const(0xFE)
_WRITE_USER1 = const(0xE6)
_READ_USER1 = const(0xE7)
Expand All @@ -63,6 +66,7 @@ def _crc(data):
class HTU21D:
"""
A driver for the HTU21D-F temperature and humidity sensor.
:param i2c_bus: The I2C bus the device is connected to
:param int address: (optional) The I2C address of the device. Defaults to :const:`0x40`
Expand Down Expand Up @@ -147,6 +151,8 @@ def measurement(self, what):
This can be useful if you want to start the measurement, but don't
want the call to block until the measurement is ready -- for instance,
when you are doing other things at the same time.
:param int what: What to measure, one of (`HUMIDITY`, `TEMPERATURE`).
"""
if what not in (HUMIDITY, TEMPERATURE):
raise ValueError()
Expand Down

0 comments on commit c17dc57

Please sign in to comment.