2023-11-24 06:24 AM
HI,
I am using ULD API function VL53L1X_CalibrateOffset() and VL53L1X_CalibrateXtalk() to calibrate the sensor and then I store the parameters in EEprom and everything works fine: with VL53L1X_GetResult() I can see the distance of the object and when it moves away, the status returns "2 ", then I can ignore the measured distance and assume that there is no object.
The problem is that when I restart the board and send the previously saved calibration parameters with VL53L1X_SetXtalk() and VL53L1X_SetOffset(), the status always returns NO ERROR and an incorrect distance.
I also tried the following procedure from VL53L1X ultra lite driver with the same results.
Any suggestions?
Thanks.
Lucio
2023-12-03 11:57 PM
Hi Lucio
From 1st half, seems your code is able to range correctly, so I suspect the issue come from wrong calibrate data was set after reboot.
Can you try to read back the offset and xtalk values to do a comparation with VL53L1X_GetOffset() and VL53L1X_GetXtalk()?
Br
Zhiyuan.Han