CircuitPython driver for the VL53L0X distance sensor. This code is adapted from the pololu driver here:

See usage in the examples/ file.

  • Author(s): Tony DiCola

Implementation Notes


Software and Dependencies:

class adafruit_vl53l0x.VL53L0X(i2c, address=41, io_timeout_s=0)[source]

Driver for the VL53L0X distance sensor.


The measurement timing budget in microseconds.


Perform a single reading of the range for an object in front of the sensor and return the distance in millimeters.


Set a new I2C address to the instantaited object. This is only called when using multiple VL53L0X sensors on the same I2C bus (SDA & SCL pins). See also the example for proper usage.

Parameters:new_address (int) – The 7-bit int that is to be assigned to the VL53L0X sensor. The address that is assigned should NOT be already in use by another device on the I2C bus.


To properly set the address to an individual VL53L0X sensor, you must first ensure that all other VL53L0X sensors (using the default address of 0x29) on the same I2C bus are in their off state by pulling the “SHDN” pins LOW. When the “SHDN” pin is pulled HIGH again the default I2C address is 0x29.


The signal rate limit in mega counts per second.