Arduino library for the VL53L1X Time-of-Flight distance sensor.
Minimal register-level Arduino library for the ST VL53L1X Time-of-Flight distance sensor.
This library focuses on:
- Simple APIs
- Clear behavior
- No hidden background tasks
- Polling-based data ready (no interrupt pin required)
- Soft reset and boot wait
- ST reference default configuration block
- Distance presets (Short / Medium / Long)
- Timing budget control
- Blocking and non-blocking read APIs
- Runtime I2C address change
- Any Arduino-compatible board with I2C (Wire)
- Tested with:
- AVR
- ESP32
Method 1: Arduino Library Manager (recommended)
- Open Arduino IDE
- Go to Sketch -> Include Library -> Manage Libraries…
- Search for 7Semi VL53L1X
- Click Install
Method 2: Install from ZIP
- Download the library ZIP from GitHub
- Open Arduino IDE
- Go to Sketch -> Include Library -> Add .ZIP Library…
- Select the downloaded ZIP file
- Restart Arduino IDE if needed
Method 3: Manual installation
-
Download or clone the repository
-
Rename the folder to:
7Semi_VL53L1X
-
Copy it into your Arduino libraries folder:
Windows: Documents/Arduino/libraries/
Linux / macOS: ~/Arduino/libraries/
-
Restart Arduino IDE
Basic wiring
VL53L1X pin -> Arduino pin
- VIN -> 3.3V or 5V
- GND -> GND
- SDA -> SDA
- SCL -> SCL
-
SDA and SCL pins depend on your board
- Arduino Uno / Nano: SDA = A4, SCL = A5
- ESP32: SDA = GPIO21, SCL = GPIO22
-
XSHUT can be used to reset or manage multiple sensors, but it is not required