General

A01NYUB sensor giving strange value

userHead Gunasekar.Hasan 2024-08-19 04:02:36 105 Views0 Replies

I using A01NYUB sensor  for calculation of safe distance in cm in my project  and the values get are accurate.  The only issue is i am getting the value of  “511 cm” randomly without any physical movement of the Sensor.  Also I get sometimes the value of “256  ” and some - ve  value once in a while

 

The three digit HEX value of  511 is 1FF…..i am unable to understand…

 

6:02:17.122 -> distance : 2798.00

16:02:17.237 -> distance : 2797.00

16:02:17.441 -> distance : 2797.00

16:02:17.517 -> distance : 511.00   < here

 

 

16:03:09.450 -> distance : 2797.00

16:03:10.108 -> distance2: -33.00 < here

16:03:10.174 -> distance2: 2768.00

16:03:10.281 -> distance2: 2768.00

 

Can  someone help me to understand this issue.

 

Thank you