2022-07-19 08:50 AM
I am checking signal status also for Big obstacle it showing Distance up to 2.1 meter(210Cm) and status is 0, and for small obstacle showing distance up to 1.2 meter(120 cm) and status is zero, it is not useful in outdoor environment , and it Hangs after some time continuously giving same result if obstacle present or not present, we are following delay as per directed by datasheet for start ranging and stop ranging
2022-07-19 08:50 AM
The sensor can only detect an object if enough photons are returned. So a large reflective object can be seen at a longer distance than a small black one. (Color does not matter, but reflectivity matters when considering the max distance.
Try a bit of board spray painted with flat black paint. This is about 5% - a worst case. Then try cardboard. This is about 50%, a typical case, and lastly white printer paper. This is about 88% and a best case.
Choose a size of whatever you think is typical.
This is an indoor sensor. Sunlight contains a lot of 940nm light and it swamps the amazingly sensitive photon detetors.
I'm going to guess the hanging is related to electrial noise. I'd check the XShut pin. My guess is a glitch on that line or the power line caused the chip to fully or partially reboot. Try some larger caps.