mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-10 10:11:29 +01:00
Update vl53l0x docs (#679)
* Update vl53l0x docs * Updated docs to reflect default timeout of 10ms * just some formats and clarifications Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
parent
11b46de1fb
commit
06d923c2db
@ -29,7 +29,7 @@ Changelog - Version 1.14.0 - November 1
|
|||||||
SGP30, components/sensor/sgp30, sgp30.jpg
|
SGP30, components/sensor/sgp30, sgp30.jpg
|
||||||
|
|
||||||
Tx20, components/sensor/tx20, tx20.jpg
|
Tx20, components/sensor/tx20, tx20.jpg
|
||||||
VL53L0x, components/sensor/vl53l0x, vl53l0x.svg
|
VL53L0x, components/sensor/vl53l0x, vl53l0x.png
|
||||||
Xiaomi CGG1, components/sensor/xiaomi_cgg1, xiaomi_cgg1.jpg
|
Xiaomi CGG1, components/sensor/xiaomi_cgg1, xiaomi_cgg1.jpg
|
||||||
Xiaomi LYWSD02, components/sensor/xiaomi_lywsd02, xiaomi_lywsd02.jpg
|
Xiaomi LYWSD02, components/sensor/xiaomi_lywsd02, xiaomi_lywsd02.jpg
|
||||||
ZyAura, components/sensor/zyaura, zgm053.jpg
|
ZyAura, components/sensor/zyaura, zgm053.jpg
|
||||||
|
BIN
components/sensor/images/vl53l0x.png
Normal file
BIN
components/sensor/images/vl53l0x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
@ -3,12 +3,12 @@ VL53L0X Time Of Flight Distance Sensor
|
|||||||
|
|
||||||
.. seo::
|
.. seo::
|
||||||
:description: Instructions for setting up VL53L0X distance sensors in ESPHome.
|
:description: Instructions for setting up VL53L0X distance sensors in ESPHome.
|
||||||
:image: vl53l0x.jpg
|
:image: vl53l0x.png
|
||||||
:keywords: VL53L0X
|
:keywords: VL53L0X
|
||||||
|
|
||||||
The ``vl53l0x`` sensor platform allows you to use VL53L0X optical time of flight
|
The ``vl53l0x`` sensor platform allows you to use VL53L0X optical time of flight
|
||||||
(`datasheet <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__,
|
(`datasheet <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__,
|
||||||
`ST <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__) with ESPHome
|
`ST <https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html>`__) with ESPHome
|
||||||
to measure distances. The sensor works optically by emitting short infrared pulses
|
to measure distances. The sensor works optically by emitting short infrared pulses
|
||||||
and measuring the time it takes the light to be reflected back
|
and measuring the time it takes the light to be reflected back
|
||||||
|
|
||||||
@ -17,8 +17,21 @@ on several conditions like surface reflectance, field of view, temperature etc.
|
|||||||
you can expect surfaces up to 60cm to work, after that you need to make sure the surface is reflecting
|
you can expect surfaces up to 60cm to work, after that you need to make sure the surface is reflecting
|
||||||
well enough (see also section 5 of datasheet).
|
well enough (see also section 5 of datasheet).
|
||||||
|
|
||||||
The :ref:`I²C Bus <i2c>` is
|
.. figure:: images/vl53l0x.png
|
||||||
required to be set up in your configuration for this sensor to work.
|
:align: center
|
||||||
|
:width: 100.0%
|
||||||
|
|
||||||
|
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
|
||||||
|
|
||||||
|
- ``VCC`` connects to 3V3 (``3V3`` will output 3.3V), or directly connect ``VCC`` to 3.3V
|
||||||
|
- ``GND`` connects to ground
|
||||||
|
- ``SCL`` connects I2C SCL (clock)
|
||||||
|
- ``SDA`` connects I2C SDA (data)
|
||||||
|
- ``GPIO1`` is not used by ESPHome
|
||||||
|
- ``XSHUT`` connects to free GPIO pin. Enable/disable device. This is optional if there is only one
|
||||||
|
VL53L0X sensor on the I²C bus and the default ``0x29`` address is used. Otherwise this is required.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. figure:: images/vl53l0x-full.jpg
|
.. figure:: images/vl53l0x-full.jpg
|
||||||
:align: center
|
:align: center
|
||||||
@ -32,7 +45,7 @@ required to be set up in your configuration for this sensor to work.
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
# Example configuration entry
|
# Simple configuration entry example
|
||||||
sensor:
|
sensor:
|
||||||
- platform: vl53l0x
|
- platform: vl53l0x
|
||||||
name: "VL53L0x Distance"
|
name: "VL53L0x Distance"
|
||||||
@ -50,11 +63,44 @@ Configuration variables:
|
|||||||
(mega counts per second). This is the minimum signal amplitude detected by the sensor necessary
|
(mega counts per second). This is the minimum signal amplitude detected by the sensor necessary
|
||||||
for it to report a valid reading. Setting a lower value may increase the range of the sensor
|
for it to report a valid reading. Setting a lower value may increase the range of the sensor
|
||||||
but also increases the chance of getting inaccurate readings. Defaults to ``0.25``.
|
but also increases the chance of getting inaccurate readings. Defaults to ``0.25``.
|
||||||
- All other options from :ref:`Sensor <config-sensor>`.
|
|
||||||
- **long_range** (*Optional*, bool): Set the sensor in long range mode. The signal_rate_limit is overruled
|
- **long_range** (*Optional*, bool): Set the sensor in long range mode. The signal_rate_limit is overruled
|
||||||
to ``0.1``. Defaults to false.
|
to ``0.1``. Defaults to ``false``.
|
||||||
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x29``.
|
- **address** (*Optional*, int): Manually specify the i2c address of the sensor. Defaults to ``0x29``.
|
||||||
|
If an address other the ``0x29`` is specified, the sensor will be dynamically re-addressed at startup.
|
||||||
|
A dynamic re-address of sensor requires the ``enable_pin`` configuration variable to be assigned.
|
||||||
|
If more then one VL53L0X sensor is used on the same i2c bus, a unique address must be specified per sensor.
|
||||||
|
- **enable_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin connected to XSHUT
|
||||||
|
on vl53l0x to enable/disable sensor. **Required** if not using address ``0x29`` which is the cause if you
|
||||||
|
have multiple VL53L0X on the same i2c bus. In this case you have to assign a different pin to each VL53L0X.
|
||||||
|
- **timeout** (*Optional*, :ref:`config-time`): Sensor setup timeout. Default to ``10ms``.
|
||||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||||
|
- All other options from :ref:`Sensor <config-sensor>`.
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# Muliple VL53L0X sensors on same i2c bus
|
||||||
|
# Example configuration entry
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: "distance1"
|
||||||
|
id: distance1
|
||||||
|
address: 0x41
|
||||||
|
enable_pin: GPIO16
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 500ms
|
||||||
|
unit_of_measurement: "m"
|
||||||
|
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: "distance2"
|
||||||
|
id: distance2
|
||||||
|
address: 0x42
|
||||||
|
enable_pin: GPIO17
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 500ms
|
||||||
|
unit_of_measurement: "m"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
BIN
images/vl53l0x.png
Normal file
BIN
images/vl53l0x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" width="280" height="60"><path d="M20.533.8h239.511c10.31 0 18.667 8.357 18.667 18.667v20.666c0 10.31-8.358 18.667-18.667 18.667H20.534c-10.31 0-18.667-8.357-18.667-18.667V19.467C1.867 9.157 10.224.8 20.533.8z"/><path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.333" d="M20.533.8h239.511c10.31 0 18.667 8.357 18.667 18.667v20.666c0 10.31-8.358 18.667-18.667 18.667H20.534c-10.31 0-18.667-8.357-18.667-18.667V19.467C1.867 9.157 10.224.8 20.533.8z"/><g fill="#fff"><path d="M55.612 13.8L41.8 46.467H30.972L17.16 13.8h11.853l7.793 19.087 7.98-19.087zM60.732 13.8h11.013v24.127h14.747v8.54h-25.76zM105.565 25.327q6.86 0 10.08 2.893 3.267 2.847 3.267 7.513 0 3.08-1.633 5.694-1.587 2.566-4.947 4.2-3.36 1.586-8.353 1.586-3.454 0-6.907-.746-3.407-.747-5.973-2.194l3.733-8.12q2.053 1.167 4.293 1.774 2.287.606 4.434.606 1.913 0 3.08-.653 1.213-.7 1.213-1.913 0-1.167-1.073-1.727-1.074-.607-3.874-.607h-9.473L95.065 13.8h21.7v8.307H104.12l-.234 3.22zM143.165 26.727q3.78.933 5.787 3.406 2.053 2.427 2.053 5.88 0 2.94-1.633 5.507-1.587 2.52-4.947 4.107-3.36 1.586-8.353 1.586-3.453 0-6.907-.746-3.406-.747-5.973-2.194l3.733-8.12q2.007 1.167 4.294 1.774 2.333.606 4.48.606 1.913 0 3.08-.653 1.166-.653 1.166-1.867 0-2.24-3.873-2.24h-4.34v-6.766l4.807-4.9h-11.667V13.8h24.36v6.767zM158.832 13.8h11.013v24.127h14.747v8.54h-25.76zM204.645 47.213q-4.34 0-7.7-2.006-3.313-2.054-5.226-5.88-1.867-3.874-1.867-9.194t1.867-9.146q1.913-3.874 5.226-5.88 3.36-2.054 7.7-2.054t7.654 2.054q3.36 2.006 5.226 5.88 1.914 3.826 1.914 9.146t-1.914 9.194q-1.866 3.826-5.226 5.88-3.314 2.006-7.654 2.006zm0-8.82q3.734 0 3.734-8.26t-3.734-8.26q-3.733 0-3.733 8.26t3.733 8.26zM246.212 46.467l-5.647-8.727-5.506 8.727h-12.554l11.807-16.474L222.925 13.8h12.367l5.553 8.213 5.414-8.213h11.853l-11.34 15.773 12.04 16.894z"/></g></svg>
|
|
Before Width: | Height: | Size: 1.9 KiB |
@ -169,7 +169,7 @@ Sensor Components
|
|||||||
TX20, components/sensor/tx20, tx20.jpg
|
TX20, components/sensor/tx20, tx20.jpg
|
||||||
Ultrasonic Sensor, components/sensor/ultrasonic, ultrasonic.jpg
|
Ultrasonic Sensor, components/sensor/ultrasonic, ultrasonic.jpg
|
||||||
Uptime Sensor, components/sensor/uptime, timer.svg
|
Uptime Sensor, components/sensor/uptime, timer.svg
|
||||||
VL53L0x, components/sensor/vl53l0x, vl53l0x.jpg
|
VL53L0x, components/sensor/vl53l0x, vl53l0x.png
|
||||||
WiFi Signal Strength, components/sensor/wifi_signal, network-wifi.svg
|
WiFi Signal Strength, components/sensor/wifi_signal, network-wifi.svg
|
||||||
Xiaomi BLE, components/sensor/xiaomi_ble, xiaomi_mijia_logo.jpg
|
Xiaomi BLE, components/sensor/xiaomi_ble, xiaomi_mijia_logo.jpg
|
||||||
Xiaomi Miscale, components/sensor/xiaomi_miscale, xiaomi_miscale.jpg
|
Xiaomi Miscale, components/sensor/xiaomi_miscale, xiaomi_miscale.jpg
|
||||||
|
Loading…
Reference in New Issue
Block a user