nanoFramework.Iot.Device.Vl6180X
1.0.24
Prefix Reserved
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Vl6180X --version 1.0.24
NuGet\Install-Package nanoFramework.Iot.Device.Vl6180X -Version 1.0.24
<PackageReference Include="nanoFramework.Iot.Device.Vl6180X" Version="1.0.24" />
paket add nanoFramework.Iot.Device.Vl6180X --version 1.0.24
#r "nuget: nanoFramework.Iot.Device.Vl6180X, 1.0.24"
// Install nanoFramework.Iot.Device.Vl6180X as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Vl6180X&version=1.0.24 // Install nanoFramework.Iot.Device.Vl6180X as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Vl6180X&version=1.0.24
Vl6180X - distance sensor
The Vl6180X sensor is a Time-to-Flight sensor measuring precisely distances. The sensor allows you to get precise short distance measurement (from 5 millimeters to 2 meters) as well as long distance measurement (up to 8 meters but with a decreased precision). This sensor is a laser ranging sensor. It is using laser pulses to measure the distances.
Documentation
Vl6180X datasheet
Usage
Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice
, make sure you install the nanoFramework.Hardware.ESP32 nuget
:
// when connecting to an ESP32 device, need to configure the I2C GPIOs used for the bus
Configuration.SetPinFunction(11, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(10, DeviceFunction.I2C1_CLOCK);
using VL6180X sensor = new(I2cDevice.Create(new I2cConnectionSettings(1, VL6180X.DefaultI2cAddress)));
sensor.Init();
while (true)
{
var distance = sensor.ReadRange();
Console.WriteLine($"Distance: {distance.Centimeters} cm.");
Thread.Sleep(500);
}
Not implemented
- ALS (ambient light sensor
- Range scaling
- Range continuous measurement
- I2C Address set
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.16.1)
- nanoFramework.Runtime.Events (>= 1.11.26)
- nanoFramework.Runtime.Native (>= 1.7.7)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.2.751)
- nanoFramework.System.Device.Gpio (>= 1.1.52)
- nanoFramework.System.Device.I2c (>= 1.1.25)
- UnitsNet.nanoFramework.Length (>= 5.67.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.