esphome-docs/api/sensor/hdc1080.rst

33 lines
954 B
ReStructuredText

HDC1080 Temperature/Humidity Sensor
===================================
The HDC1080 component allows you get accurate temperature and humidity readings from your HDC1080
(`datasheet <http://www.ti.com/lit/ds/symlink/hdc1080.pdf>`_,
`adafruit <https://www.adafruit.com/product/2635>`_) sensors with esphomelib. To use these
i2c-based devices, first initialize the i2c bus using the pins you have for SDA and SCL and
then create the sensors themselves as in below example.
Example Usage
-------------
.. code-block:: cpp
// inside setup()
App.init_i2c(SDA_PIN, SCL_PIN); // change these values for your pins.
// create sensors
App.make_hdc1080_sensor("Outside Temperature", "Outside Humidity");
.. cpp:namespace:: esphomelib
See :cpp:func:`Application::make_hdc1080_sensor`.
API Reference
-------------
.. cpp:namespace:: nullptr
.. doxygenclass:: sensor::HDC1080Component
:members:
:protected-members:
:undoc-members: