This distance sensor comes in the same form factor as the popular Sharp Distance Sensor. This distance sensor contains a tiny invisible laser source, and a matching sensor. It can detect the "time of flight", or how long the light has taken to bounce back to the sensor. Since it uses a very narrow light source, it is good for determining distance of only the surface directly in front of it. Unlike sonars that bounce ultrasonic waves, the 'cone' of sensing is very narrow. Unlike IR distance sensors that try to measure the amount of light bounced, the VL53L0x is much more precise and doesn't have linearity problems or 'double imaging' where you can't tell if an object is very far or very close.
This sensor can handle about 50mm to 1200mm of range distance. It also includes a lux sensor.
The sensor is small and easy to use in any robotics or interactive project. Module comes with a regulator and level shiftor so you can use it with any 3-5V power or logic microcontroller with no worries. Each module comes with a small piece of header. Solder the header onto your breakout board with your iron and some solder and wire it up for instant distance-sensing-success!
Communicating to the sensor is done over I2C with an API written by ST, so its not too hard to port it to your favorite microcontroller.
Libraries and Sample codes are available for Arduino and Raspberry Pi, which makes it easy to use the sensor in your project.