esphome-docs/api/sensor/bh1750.rst
Otto Winter 063b170d02
Docs for release-candidate
Still need to update some images
2018-08-22 22:05:28 +02:00

35 lines
799 B
ReStructuredText

BH1750 Ambient Light Sensor
===========================
The BH1750 sensor allows you to use your BH1750 i2c-enabled ambient light sensor with
esphomelib (`datasheet <http://www.mouser.com/ds/2/348/bh1750fvi-e-186247.pdf>`__).
It requires i2c to be setup to work.
Example Usage
-------------
.. code-block:: cpp
// Basic
auto bh1750 = App.make_bh1750_sensor("BH1750 Illuminance");
// Advanced settings
// default resolution is 0.5 LX
bh1750.bh1750->set_resolution(sensor::BH1750_RESOLUTION_1P0_LX);
.. cpp:namespace:: nullptr
See :cpp:func:`Application::make_bh1750_sensor`.
API Reference
-------------
.. cpp:namespace:: nullptr
.. doxygenclass:: sensor::BH1750Sensor
:members:
:protected-members:
:undoc-members:
.. doxygenenum:: sensor::BH1750Resolution