Skip to content

A GNU/Linux library for the VL53L1X time-of-flight distance sensor; based on VL53L1X-arduino by Pololu

License

Notifications You must be signed in to change notification settings

mjbogusz/vl53l1x-linux

Repository files navigation

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

About

A GNU/Linux library for the VL53L1X time-of-flight distance sensor; based on VL53L1X-arduino by Pololu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •