zephyr/samples/sensor/vl53l0x
Vincent Veron 8310c53200 sample: sensor: Add vl53l0x sample application
This sample application allows to test vl53l0x distance sensor.
By default it is built with disco_l475_iot1 board as it is
built-in.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2018-01-23 10:14:49 -06:00
..
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _vl53l0x:

VL53L0X: Time Of Flight sensor
##############################

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: http://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.

 .. code-block:: console

    $ cd samples/sensors/vl53l0x
    $ mkdir disco_l475_iot1 && cd disco_l475_iot1
    $ cmake -DBOARD=disco_l475_iot1 ..
    $ make

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>