← All parts
Adafruit VL53L0X Time-of-Flight
Adafruit
The Adafruit VL53L0X Time-of-Flight Micro-LIDAR Distance Sensor Breakout board is a small and easy-to-use distance sensor that communicates over I2C. It supports multiple sensors on the same bus with unique addresses.
In stock
Specifications
2- Operating Voltage
- 3-5V (Vin) / 2.8V (2v8) output
- Logic Level
- 3-5V for Vin, 2.8V for I2C
Pinout
5| Pin | Name | Functions | Notes |
|---|---|---|---|
| Vin | Power | POWER | 3-5V input |
| 2v8 | 2.8V Output | — | 100mA max current |
| GND | Ground | GND | |
| SCL | I2C Clock | I2C | |
| SDA | I2C Data | I2C |
Interactive pinout
Highlight:
BOARD
Click a pin to copy its name · tap a tag above to spotlight a bus.
Starter code
Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.
Arduino (C++)
Arduino library: Adafruit_VL53L0X
arduino
// VL53L0X time-of-flight distance (I2C) — community starter example
#include <Adafruit_VL53L0X.h>
Adafruit_VL53L0X lox;
void setup() {
Serial.begin(115200);
if (!lox.begin()) { Serial.println("VL53L0X not found"); while (1) delay(10); }
}
void loop() {
VL53L0X_RangingMeasurementData_t m;
lox.rangingTest(&m, false);
if (m.RangeStatus != 4) { Serial.print(m.RangeMilliMeter); Serial.println(" mm"); }
else { Serial.println("out of range"); }
delay(200);
}MicroPython
MicroPython library: vl53l0x (kevinmcaleer/vl53l0x or port)
python
# VL53L0X (ESP32) — community starter example
# lib: a VL53L0X MicroPython driver (e.g. kevinmcaleer/vl53l0x)
from machine import Pin, I2C
import VL53L0X, time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
tof = VL53L0X.VL53L0X(i2c)
tof.start()
while True:
print(tof.read(), "mm")
time.sleep_ms(200)Wiring
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| Vin | +5V | 3V3 | Breakout 3-5 V safe |
| GND | GND | GND | |
| SCL | A5/SCL | GPIO22 | I2C clock |
| SDA | A4/SDA | GPIO21 | I2C data |
Typical uses
- Short-range distance (up to ~2 m)
- Obstacle detection and gesture distance