cancel
Showing results for 
Search instead for 
Did you mean: 

Customer asks, "I am using VL53L1X , code works fine when there is obstacle in the range of 0 to 4 meter ,if no obstacle above 4 meter sensor is giving random values , how we can fix this issue?"

John E KVAM
ST Employee
 

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

There is a Range Status that you can read from the sensor. It will tell you what happened. But basically if you don't get a '0' status, something went wrong and you cannot use the result.

This 'Range Status' is not the result of your function. Your 'read_result' function worked just fine. This is a register returned by the sensor giving you the hardware status.

With no object, no photons will be returned, and your Range Status will return a 'no signal' status.

but there are other conditions you should look for.

(Generally the Range Result will be 8192 minus the status, but don't count on it. Check the Range Status.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

There is a Range Status that you can read from the sensor. It will tell you what happened. But basically if you don't get a '0' status, something went wrong and you cannot use the result.

This 'Range Status' is not the result of your function. Your 'read_result' function worked just fine. This is a register returned by the sensor giving you the hardware status.

With no object, no photons will be returned, and your Range Status will return a 'no signal' status.

but there are other conditions you should look for.

(Generally the Range Result will be 8192 minus the status, but don't count on it. Check the Range Status.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.