nanoFramework.Iot.Device.Vl6180X
1.0.44
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Vl6180X --version 1.0.44
NuGet\Install-Package nanoFramework.Iot.Device.Vl6180X -Version 1.0.44
<PackageReference Include="nanoFramework.Iot.Device.Vl6180X" Version="1.0.44" />
paket add nanoFramework.Iot.Device.Vl6180X --version 1.0.44
#r "nuget: nanoFramework.Iot.Device.Vl6180X, 1.0.44"
// Install nanoFramework.Iot.Device.Vl6180X as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Vl6180X&version=1.0.44 // Install nanoFramework.Iot.Device.Vl6180X as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Vl6180X&version=1.0.44
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.11)
- nanoFramework.Runtime.Events (>= 1.11.29)
- nanoFramework.Runtime.Native (>= 1.7.8)
- nanoFramework.System.Buffers.Binary.BinaryPrimitives (>= 1.2.771)
- nanoFramework.System.Device.Gpio (>= 1.1.53)
- nanoFramework.System.Device.I2c (>= 1.1.26)
- UnitsNet.nanoFramework.Length (>= 5.69.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.