Hello, I am using VL53L1X sensor. Everything is working well unless this problem : When no object is detected the sensor keeps sending random ranging values Do you have any explanation to this ? And how can I fix this problem in the firmware ?
..
..
After getting the range distance, or maybe even before it, get the RangeStatus. This is NOT the status that the function returns, but is a register in the sensor that tells you what the status of your number is.
Zero - is what you are hoping for. That's perfect. But there are a dozen other RangeStatus and you can either treat them as warnings and accept them. Or you can treat them as "no legitimate range" and proceed as if no valid target was within the area.
We've always struggled with what to return if the sensor did not get a good range. Generally the algorithm just gives up, sets the RangeStatus, and the distance is whatever it happened to be when the logic gave up.
So your really, really have to check the RangeStatus. It's arguably more important than the distance.
-john
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.