Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 2.59 KB

README.md

File metadata and controls

53 lines (40 loc) · 2.59 KB

VL53L1X library for GNU/Linux

pipeline status

[[TOC]]

About

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.

Supported platforms

This library is designed to work with most GNU/Linux-based single board computers, including Raspberry Pi, BeagleBone and others, exporting the i2cdev interface.

Getting started

Hardware

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.

Connections

TBD

Software

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 or git submodule update --init --recursive
  • colcon workspace: have the sbc-linux-interfaces package available in colcon_ws/src

No further action is required - the interfaces library should be picked up by CMake regardless of the selected method.

Examples

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

Credits