By testing with different lidar and sonar I am stuck with the lidar VX53L1X, and constantly get “Bad LIDAR Health”. I have tested two units with the same result.
On the contrary, the tests with the lidar VX53L0X are satisfactory.
These are the parameters modified according to the recommendation:
RNGFND1_TYPE = 16 (same as VL53L0X)
RNGFND1_ADDR = 41 (The sensor’s default I2C address is 0x29 hexademical which is 41 in decimal)
RNGFND1_SCALING = 1
RNGFND1_MIN_CM = 5
RNGFND1_MAX_CM = 360 for the VL53L1X.(120 for the VL53L0X)
RNGFND1_GNDCLEAR = 15
There are quite a few subtle differences between these sensors and the drivers. If you compare the source code for the two devices you will see that the internal registers and values are different which is why is isnt responding as expected.
RNGFND1_MIN_CM = 5 - RNGFND1_MAX_CM = 100
When you set the values in this way, there is no problem as long as it stays between this range. I guess you will experience it when the boredom goes outside of this range. Have you ever tried?