VL53L3CX Python
Simple library for interacting with VL53L3CX sensors via python. This project is based on the VL53L0X_rasp_python project by John Bryan Moore.
Connect your VL35L3CX module of choice via V+, GND, I2C clock, I2C data and xshut if you are using more then one sensor. The default address is 0x29. If you are using more sensors, drive the xshut high for all sensors but one, change address, then drive next xshut low, change address and repeat the process until all sensors have unique addresses.
(Note that there is no support for multiplexers as I originally built this for my own use and later I thought to myself the library might come in handy for someone and it is probably worth sharing.)
Installing
pip install VL53L3CX
Usage
Look into examples to get basic gist of the usage. There are two simple python scripts - distance and change-address that probably cover all the usage cases you would ever need.
Basic functions are:
VL53L3CX.open() - starts I2C
VL53L3CX.start_ranging() - starts the sensor itself
VL53L3CX.stop_ranging() - stops the sensor
VL53L3CX.get_distance() - returns the measured distance in millimeters, should be called with if VL53L3CX.is_ranging_ready():
VL53L3CX.is_ranging_ready() - returns true if sensor is ready to be read
VL53L3CX.change_address(new_address) - changes the current I2C address to a new one specified
Not properly tested bonus functions I didn't end up using:
VL53L3CX.set_distance_mode(mode) - set distance mode to 1-short, 2-medium, 3-long
VL53L3CX.set_timing_budget(timing_budget) - in microseconds
VL53L3CX.wait_for_data() - interrupt the program until data is ready
Metadata
Release files for VL53L3CX 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vl53l3cx-1.0.2.tar.gz | 159.2 kB | Without provenance | Details for vl53l3cx-1.0.2.tar.gz |
Release files / vl53l3cx-1.0.2.tar.gz
| Download URL | vl53l3cx-1.0.2.tar.gz |
|---|---|
| Size | 159.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4e6b442133f16b2243caca3fc76e3f2a04e506926bb2a6c7ab5014cbabc87bf
|
|
BLAKE2b-256 checksum How to use checksums |
96bad42a6ba9ae4c250dc3ec186d70e9021d422fa52d9e7cb95847895aba2fec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.2
|
Security for VL53L3CX 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.