hdc1080¶
Author(s): sensebox
Implementation Notes¶
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
# * Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice # * Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class hdc1080.HDC1080(i2c, address=HDC1080_I2C_ADDR)¶
Library for the HDC1080 Temperature and Humidity Sensor.
- Parameters:
Quickstart: Importing and using the HDC1080
Here is an example of using the
HDC1080class. First you will need to import the libraries to use the sensorimport board from hdc1080.basic import HDC1080
Once this is done you can define your
board.I2Cobject and define your sensor objecti2c = board.I2C() # uses board.SCL and board.SDA hdc = HDC1080(i2c) Now you have access to the :attr:`temperature` and :attr:`humidity` attributes.
temperature = hdc.temperature humidity = hdc.humidity