rpi-vl53l0x

Userspace Raspberry Pi VL53l0X library


License
MIT
Install
pip install rpi-vl53l0x==0.0.1

Documentation

VL53L0X on Raspberry Pi

This project helps to build and use the VL53L0X API (provided by ST Microelectronics) on Raspberry Pi.

Installation

API_DIR
    |_Api
        |_core
            |_inc
            |_src
        |_platform
            |_inc
            |_src

Compilation

API_DIR=path/to/the/api/dir make
  • If you are cross compiling it would be:
API_DIR=path/to/the/api/dir CROSS_COMPILE=arm-linux-gnueabihf- make
  • Next, compile the example programs. Again, on a raspberry pi:
API_DIR=path/to/the/api/dir make examples
  • If you cross compile:
API_DIR=path/to/the/api/dir CROSS_COMPILE=arm-linux-gnueabihf- make examples
  • If you did cross compile, copy the examples programs from the bin folder to your Raspberry Pi. Otherwise just navigate to the bin folder on your raspberry pi and execute:
./vl53l0x_ContinuousRanging_example

or

./vl53l0x_SingleRanging_Long_Range_Example
  • run the one of the example programs and enjoy!

Note : I know there are kernel driver sources in the API sources, I don't want to use it because it is easier to compil/debug/test/install... a userspace program than a kernel module (high perf is not necessary here).

alt text

Distribute to Pypi

cd python
python -m pip install --user --upgrade twine
python  setup.py sdist bdist_wheel
python3 setup.py bdist_wheel
twine upload --verbose dist/*