Skip to content
Python library for the VL53L1X Laser Ranger
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api Implemented polling loop Jul 9, 2018
examples
python Actually use i2c_bus parameter Apr 17, 2019
python_lib Disabled XTalk compensation, set inter meas period Jul 9, 2018
.gitignore Initial Commit Jun 21, 2018
CHANGELOG.txt Prep for 0.0.3, Py3.7 support Jul 9, 2019
MANIFEST.in Release tweaks for 0.0.2 Aug 15, 2018
Makefile Added -std=c99 for older GCC versions Jul 13, 2018
README.md Reference examples Jul 25, 2018
dist.sh Prep for 0.0.3, Py3.7 support Jul 9, 2019
install.sh Prep for 0.0.3, Py3.7 support Jul 9, 2019
setup.py Prep for 0.0.3, Py3.7 support Jul 9, 2019
test.c Initial Commit Jun 21, 2018
test.py Added shebang for test.py Jul 13, 2018

README.md

vl53l1x-python

Python library for the VL53L1X Laser Ranger.

Installing

sudo pip install smbus2
sudo pip install vl53l1x

Usage

import VL53L1X

tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)
tof.open() # Initialise the i2c bus and configure the sensor
tof.start_ranging(1) # Start ranging, 1 = Short Range, 2 = Medium Range, 3 = Long Range
distance_in_mm = tof.get_distance() # Grab the range in mm
tof.stop_ranging() # Stop ranging

See examples for more advanced usage.

You can’t perform that action at this time.