zephyr/samples/sensor/vl53l0x
Benjamin Cabé 34982bb00b doc: samples: use :zephyr-app: for in-tree samples
The zephyr-app-commands directive can output a helpful hint to the user
when they are trying to build a sample that is in the Zephyr tree,
telling them to ensure they are in the root folder of the Zephyr repo.

Update all doc pages that were using :app: instead of :zephyr-app: so
that the hint is displayed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:18:05 -04:00
..
src
CMakeLists.txt
prj.conf
README.rst
sample.yaml

.. zephyr:code-sample:: vl53l0x
   :name: VL53L0X Time Of Flight sensor
   :relevant-api: sensor_interface

   Get distance data from a VL53L0X sensor (polling mode).

Overview
********

This sample periodically measures distance between vl53l0x sensor
and target. The result is displayed on the console.
It also shows how we can use the vl53l0x as a proximity sensor.

Requirements
************

This sample uses the VL53L0X sensor controlled using the I2C interface.

References
**********

 - VL53L0X: https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html

Building and Running
********************

 This project outputs sensor data to the console. It requires a VL53L0X
 sensor, which is present on the disco_l475_iot1 board.

 .. zephyr-app-commands::
    :zephyr-app: samples/sensor/vl53l0x/
    :goals: build flash


Sample Output
=============

 .. code-block:: console

    prox is 0
    distance is 1938
    prox is 1
    distance is 70
    prox is 0
    distance is 1995

    <repeats endlessly every second>