Why am I getting VL53L0X Error: -6?
I have a single 'known good' VL53L0X hooked up to an Arduino Mega 2560 through a bidirectional level shifter. When I attempt to initialize it I get the following output:
Opening port
Port open
Arduino Hex VL53L0X Demo
In Adafruit_VL53L0X::begin(29,1,642)
VL53L0X Info:
Device Name: VL53L0X ES1 or later, Type: VL53L0X, ID: VL53L0CBV0DH/1$1
Rev Major: 1, Minor: 1
VL53L0X: StaticInit
VL53L0X: PerformRefSpadManagement
refSpadCount = 2226323456, isApertureSpads = 10
Status = -6
VL53L0X Error: -6
Failed to boot lidar_RFIt looks like the I2C bus is OK, as it is reading the device name and details correctly, but the VL53L0X_PerformRefSpadManagement() call returns with Status = -6, and the rest of the initialization is skipped.
I tried modifying the library code to skip the VL53L0X_PerformRefSpadManagement() call, but then VL53L0X_PerformRefCalibration() also returns with a -6 Status code.
Any idea what I'm doing wrong here?
TIA,
Frank
