Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

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.

I2C

Community draft — report a mistake

CategorySensor
InterfaceI2C
Voltage2.6–5 V (on-board regulator)
Typical price₹250

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

PinWhat it does
VIN2.6–5 V supply
GNDGround
SCLI2C clock
SDAI2C data
GPIO1Interrupt output (optional)
XSHUTShutdown 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.

↑↓ to move · Enter to open