and this can actually calculate the distance of the object .
Here i will use this feature to analogWrite the LED. which will incerease its brightness as the distance gets lesser ...
Step 1: The Circuit
-LED(Indicator ,any colour)
-IR LED Pair
You should follow The Schematict to make your own sensor then you may follow ahead ........