I have a brand new Pimoroni VL53L1X connected to the I2C bus on my Raspberry Pi 4B. Using this Python library, I get a segmentation fault when I start ranging:
Python 2.7.17 (default, Apr 15 2020, 17:20:14)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import VL53L1X
>>> tof = VL53L1X.VL53L1X()
>>> tof.open()
VL53L1X Start Ranging Address 0x29
VL53L0X_GetDeviceInfo:
Device Name : VL53L1 cut1.1
Device Type : VL53L1
Device ID :
ProductRevisionMajor : 1
ProductRevisionMinor : 11
>>> tof.start_ranging(1)
Segmentation fault
I've tried building from source and got the same error. Also the same on Ubuntu instead of Raspbian.
I thought I just had a dodgy sensor, but if I use the qwiic_vl53l1x library from SparkFun, everything works fine:
Python 2.7.17 (default, Apr 15 2020, 17:20:14)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import qwiic_vl53l1x
>>> tof = qwiic_vl53l1x.QwiicVL53L1X()
>>> tof.sensor_init()
>>> tof.set_distance_mode(1)
1
>>> tof.start_ranging()
>>> tof.get_distance()
190
>>> tof.stop_ranging()
I have a brand new Pimoroni VL53L1X connected to the I2C bus on my Raspberry Pi 4B. Using this Python library, I get a segmentation fault when I start ranging:
I've tried building from source and got the same error. Also the same on Ubuntu instead of Raspbian.
I thought I just had a dodgy sensor, but if I use the qwiic_vl53l1x library from SparkFun, everything works fine: