Sensor with separate header pins

Using the VL53L1X Time-of-Flight Distance Sensor

This short tutorial introduces the VL53L1X Time-of-Flight (ToF ) distance sensor and hook it up to an Arduino Nano.

Further directions:

If you bought it like this:

Sensor with separate header pins

You will first have to solder the header pins.

Connect the sensor

Because the sensor uses I2C its wiring is simple:

Sensor:     Arduino:    Wire color in diagram:
GND         GND         black
VCC         5V          red
SCL         A5 (SCL)    yellow
SDA         A4 (SDA)    blue

It’s operating voltage is 3.3V or 5V, so feel free to connect VCC to either of those.

Test with given example sketch from library

To use the sensor in the Arduino IDE you can install the library “VL53L1X” by Pololu:

After installation, select the example “Continuous” (via File > Examples):

Next, you may Upload this example, and start the Serial Monitor to see its output.

Depending on your application, you could make minor changes to the code to do measurements less frequent and to store the distance value in a variable:

More information