nanoFramework.Iot.Device.Vl53L1X 1.2.1

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Vl53L1X --version 1.2.1
                    
NuGet\Install-Package nanoFramework.Iot.Device.Vl53L1X -Version 1.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Vl53L1X" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Vl53L1X" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Vl53L1X" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Vl53L1X --version 1.2.1
                    
#r "nuget: nanoFramework.Iot.Device.Vl53L1X, 1.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Vl53L1X@1.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Vl53L1X&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Vl53L1X&version=1.2.1
                    
Install as a Cake Tool

VL53L1X distance sensor

The VL53L1X is a Time-of-Flight laser-ranging sensor with accurate ranging up to 4 m and a ranging frequency up to 50 Hz. It integrates a SPAD receiving array, a 940 nm Class 1 laser emitter, infrared filters, and programmable region-of-interest (ROI) support.

Documentation

VL53L1X

Wiring

Connect VIN to the board supply, GND to ground, SDA to the I2C data pin, and SCL to the I2C clock pin. The XSHUT pin may be left pulled high for a single sensor. On ESP32, the sample uses GPIO21 for SDA and GPIO22 for SCL on I2C bus 1.

VL53L1X ESP32
VIN 3.3 V
GND GND
SDA GPIO21
SCL GPIO22

Usage

All calibration and initial setup are performed when the binding is created. Make sure the device is enabled through the XSHUT pin before constructing the sensor.

Configuration.SetPinFunction(Gpio.IO21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(Gpio.IO22, DeviceFunction.I2C1_CLOCK);

I2cConnectionSettings settings = new(1, Vl53L1X.DefaultI2cAddress);
using I2cDevice i2cDevice = I2cDevice.Create(settings);
using Vl53L1X sensor = new(i2cDevice);

sensor.Precision = Precision.Short;

while (true)
{
    Debug.WriteLine($"Distance: {sensor.Distance.Millimeters} mm");
    Debug.WriteLine($"Range status: {sensor.RangeStatus}");
    Thread.Sleep(500);
}
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 75 9/29/2026