2018-05-13 11:37:02 +02:00
|
|
|
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");
|
|
|
|
|
2018-05-14 21:15:49 +02:00
|
|
|
.. cpp:namespace:: nullptr
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
|
|
See :cpp:func:`Application::make_hdc1080_sensor`.
|
|
|
|
|
|
|
|
API Reference
|
|
|
|
-------------
|
|
|
|
|
|
|
|
.. cpp:namespace:: nullptr
|
|
|
|
|
|
|
|
.. doxygenclass:: sensor::HDC1080Component
|
|
|
|
:members:
|
|
|
|
:protected-members:
|
|
|
|
:undoc-members:
|