2025-08-07 4:27 AM - last edited on 2025-08-07 4:30 AM by Andrew Neil
The STSW-IMG009 VL53L1X ULD API (Ultra Lite Driver Application Programming Interface) has a bug in the function VL53L1X_SensorInit that blocks the code from being executed if status |= VL53L1X_CheckForDataReady(dev, &tmp); write 0 constantly in tmp
The block
while (tmp == 0) {
status |= VL53L1X_CheckForDataReady(dev, &tmp);
}
has no timeout implemented and, for instance, if a cable or a sensor breaks for some reason, the code will endup stuck there
Please also see this github issue exit VL53L1X_SensorInit() after timeout if no sensor / sensor doesn't work · Issue #29 · sparkfun/SparkFun_VL53L1X_Arduino_Library
where a timeout is added Add timeout to sensorInit · sparkfun/qwiic_vl53l1x_py@1154d07 · GitHub