README.rst
1.. zephyr:code-sample:: vl53l0x
2 :name: VL53L0X Time Of Flight sensor
3 :relevant-api: sensor_interface
4
5 Get distance data from a VL53L0X sensor (polling mode).
6
7Overview
8********
9
10This sample periodically measures distance between vl53l0x sensor
11and target. The result is displayed on the console.
12It also shows how we can use the vl53l0x as a proximity sensor.
13
14Requirements
15************
16
17This sample uses the VL53L0X sensor controlled using the I2C interface.
18
19References
20**********
21
22 - VL53L0X: https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html
23
24Building and Running
25********************
26
27 This project outputs sensor data to the console. It requires a VL53L0X
28 sensor, which is present on the disco_l475_iot1 board.
29
30 .. zephyr-app-commands::
31 :zephyr-app: samples/sensor/vl53l0x/
32 :goals: build flash
33
34
35Sample Output
36=============
37
38 .. code-block:: console
39
40 prox is 0
41 distance is 1938
42 prox is 1
43 distance is 70
44 prox is 0
45 distance is 1995
46
47 <repeats endlessly every second>
48