Datasheet

adafruit_vl53l0x.mpy
adafruit_bus_device
You can also download the adafruit_vl53l0x.mpy from its releases page on Github (https://adafru.it/C63).
Before continuing make sure your board's lib folder or root filesystem has
the adafruit_vl53l0x.mpy, and adafruit_bus_device files and folders copied over.
Next connect to the board's serial REPL (https://adafru.it/Awz)so you are at the CircuitPython >>> prompt.
Python Installation of VL53L0X Library
You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also
require enabling I2C on your platform and verifying you are running Python 3. Since each platform is a little different,
and Linux changes often, please visit the CircuitPython on Linux guide to get your computer
ready (https://adafru.it/BSN)!
Once that's done, from your command line run the following command:
sudo pip3 install adafruit-circuitpython-vl53l0x
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use
CircuitPython on Python 2.x, it isn't supported!
CircuitPython & Python Usage
To demonstrate the usage of the sensor we'll initialize it and read the range and more from the board's Python REPL.
Run the following code to import the necessary modules and initialize the I2C connection with the sensor:
Now you're ready to read values from the sensor using any of these properties:
range - The distance in millimeter to an object in front of the sensor.
In addition you can adjust the measurement timing budget to change the speed and accuracy of the sensor. Get and
set the measurement_timing_budget property with a value in nanoseconds. For example to increase the timing
budget to a more accurate but slower 200ms value:
import board
import busio
import adafruit_vl53l0x
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_vl53l0x.VL53L0X(i2c)
print('Range: {}mm'.format(sensor.range))
sensor.measurement_timing_budget = 200000
© Adafruit Industries https://learn.adafruit.com/adafruit-vl53l0x-micro-lidar-distance-sensor-breakout Page 18 of 23