Infrared range sensors have been around for a long time. Being able to use the analog output to determine how far objects are from the sensor is quite a handy tool for many different applications. This tutorial shows you exactly how to do that!
PyroFactor: