VL53L0X ToF distance sensor
VL53L0X breakout pinout, the fixed 0x29 address and using XSHUT for several sensors, measuring up to ~2 m, and comparison with the HC-SR04.
Community draft — report a mistake
3.3 V or 5 V? Breakouts with a regulator and level shifting accept 3.3 V or 5 V. Bare boards without them are 2.8 V-only — check the listing.
The ST VL53L0X measures distance with an invisible 940 nm laser and a time-of-flight sensor: it times how long the light takes to bounce back. It reads up to about 1.2 m by default and ~2 m in long-range mode, with millimetre resolution and a narrow 25° cone.
Compared with the HC-SR04 it’s tiny, works at 3.3 V without a divider, and doesn’t care about soft fabrics — but it struggles in direct sunlight and on black surfaces.
Address: fixed at 0x29 on power-up. To use several, wire each XSHUT to a GPIO and assign new addresses one at a time.
Prices are indicative (Oct 2026) and vary by seller.
Pinout
| Pin | What it does |
|---|---|
VIN | 2.6–5 V supply |
GND | Ground |
SCL | I2C clock |
SDA | I2C data |
GPIO1 | Interrupt output (optional) |
XSHUT | Shutdown input: pull LOW to turn the sensor off — used to give several sensors different addresses at start-up |
I2C address:0x29
Library
VL53L0X by Pololu
Arduino IDE → Library Manager → search the name above. Each guide lists the exact version we compile against.
Use it with
Common errors
Reads 8190 or 8191 mm
Out of range or no target. Range drops in bright sunlight and on dark surfaces.
Two sensors both answer at 0x29
Hold one in reset with XSHUT, set the other's address with setAddress(), then release the first.
Readings off by a few cm
Remove the protective film on the sensor window — easy to miss — and use the long-range or high-accuracy profile as needed.