ESP8266&VL53L0X realizes laser ranging

VL53L0X is a new generation of time-of-flight (ToF) laser ranging module, using the smallest package on the market today. Unlike traditional technologies, it can provide accurate distance measurement regardless of the target reflectivity. It can measure absolute distances up to 2m, setting new benchmarks in performance and opening the door to a variety of new applications.

VL53L0X integrates a leading SPAD array (single photon avalanche diode) and embeds ST's second-generation FlightSenseTM patented technology.

The VL53L0X's 940 nm VCSEL emitter (Vertical Cavity Surface Emitting Laser) is completely invisible to the human eye, and coupled with the internal physical IR filter, it can achieve longer ranging distances, Higher ambient light immunity and better robustness to cover glass optical crosstalk.

I2C only allows one address per device, so you must ensure that each I2C device has a unique address. The default address of the VL53L0X is 0x29, but you can change it in software.

To set up a new address, you can use one of two methods. During initialization, instead of calling lox.begin(), lox.begin(0x30) is called to set the address to 0x30. Alternatively, you can always call lox.setAddress(0x30) later.