- Version: 0.2.1
- Status: should-be-working, 2 examples provided
- Homepage: https://gitlab.com/mjbogusz/vl53l1x-linux
- Mirror: https://github.com/mjbogusz/vl53l1x-linux
- Documentation/API: https://mjbogusz.gitlab.io/vl53l1x-linux/
[[TOC]]
This is a library for GNU/Linux-based SBCs that helps interfacing with the ST's VL53L1X time-of-flight distance sensor. The library aims to make it simple to configure the sensor and read range data from it via I²C. Additionally multiple sensors on the same bus are supported.
This library is designed to work with most GNU/Linux-based single board computers, including Raspberry Pi, BeagleBone and others, exporting the i2cdev
interface.
A VL53L1X carrier can be purchased from Pololu's website. Before continuing, careful reading of the product page as well as the VL53L1X datasheet is recommended.
TBD
This library depends on the sbc-linux-interfaces library.
It can be accesses either as a git submodule or as an ament
dependency in a colcon
(ROS2) workspace.
SBC-linux-interfaces options:
- git submodule:
git clone --recursive
orgit submodule update --init --recursive
- colcon workspace: have the
sbc-linux-interfaces
package available incolcon_ws/src
No further action is required - the interfaces library should be picked up by CMake regardless of the selected method.
Several examples are available that show how to use the library:
getDistance
is a minimal working example for a single sensor;multipleSensors
is an example of interfacing with multiple sensors on the same bus.
To build the examples, run cmake
with the flag: -DBUILD_EXAMPLES=On
and compile the project.
Then, the examples can be executed as:
build/examples/getDistance.cpp
build/examples/multipleSensors.cpp
- based upon
DFRobot_VL53L1X Library for Arduino
by luoyufeng