Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.99 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.99 KB

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