2022-06-16 7:49 AM
Solved! Go to Solution.
2022-06-16 7:54 AM
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.
2022-06-16 7:54 AM
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.