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
 

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
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.


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

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.


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'