esphome-docs/components/sensor/hmc5883l.rst

61 lines
2.3 KiB
ReStructuredText
Raw Normal View History

HMC5883L Magnetometer
=====================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up HMC5883L IMU compass sensors.
:image: hmc5883l.jpg
:keywords: HMC5883L
The ``hmc5883l`` allows you to use your HMC5883L triple-axis magnetometers
(`datasheet <https://cdn-shop.adafruit.com/datasheets/HMC5883L_3-Axis_Digital_Compass_IC.pdf>`__,
`Adafruit`_) with
esphomelib. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.
.. _Adafruit: https://www.adafruit.com/product/1746
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: hmc5883l
address: 0x68
field_strength_x:
name: "HMC5883L Field Strength X"
field_strength_y:
name: "HMC5883L Field Strength Y"
field_strength_z:
name: "HMC5883L Field Strength Z"
heading:
name: "HMC5883L Heading"
range: 130uT
2019-01-06 18:56:14 +01:00
update_interval: 60s
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x1E``.
- **field_strength_x** (*Optional*): The field strength in microtesla along the X-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- **field_strength_y** (*Optional*): The field strength in microtesla along the Y-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- **field_strength_z** (*Optional*): The field strength in microtesla along the Z-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- **heading** (*Optional*): The heading of the sensor in degrees. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
2019-01-06 18:56:14 +01:00
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
See Also
2018-08-24 22:44:01 +02:00
--------
- :ref:`sensor-filters`
- :doc:`template`
- :doc:`ultrasonic`
- :apiref:`sensor/hmc5883l.h`
2018-08-24 22:44:01 +02:00
- `HMC5883L Library <https://github.com/jarzebski/Arduino-HMC5883L>`__ by `Korneliusz Jarzębski <https://github.com/jarzebski>`__
- :ghedit:`Edit`
2018-10-12 16:33:22 +02:00
.. disqus::