These sort of schemes don't work on the strength of the light. They measure the time it takes for either the ultrasound or the light
wave or the radar wave to go there and back. As you get to shorter distances, the time becomes to short to measure without
special equipment.
The other thing you can do, is have two lights on one device. Take a photo with a video camera on the other device and
measure the distance between the two lights in the picture, you can calculate the distance that way. The further away
the other device is, the closer together the two lights will look, in the picture.