Vl53L1X Class

Definition

Represents Vl53L1X

public class Vl53L1X : IDisposable
type Vl53L1X = class
    interface IDisposable
Public Class Vl53L1X
Implements IDisposable
Inheritance
Vl53L1X
Implements

Constructors

Vl53L1X(I2cDevice, Int32, Boolean)

Creates a Vl53L1X sensor class

Fields

DefaultI2cAddress

The default I2C address

Properties

AmbientPerSpad

Returns the ambient per SPAD in kcps/SPAD.

AmbientRate

Returns the ambient rate in kcps.

BootState

Gets the BootState of the device (1 = booted, 0 = not booted).

Distance

Gets the measured distance. If ranging has not been started yet, the function will automatically start the ranging feature of the device.

DistanceThresholdHigh

Returns the high threshold.

DistanceThresholdLow

Returns the low threshold.

DistanceThresholdWindowDetectionMode

Returns the WindowDetectionMode.

InterMeasurementInMs

Gets or sets the intermeasurement period in ms. Intermeasurement period must be >/= timing budget. This condition is not checked by the API, the customer has the duty to check the condition. Default = 100 ms.

InterruptPolarity

This gets or sets the interrupt polarity. PinValue.High is default.

IsRangingActive

This function returns whether to ranging is active or not

Offset

Gets or sets the offset correction value.

Precision

Gets or sets the precision (1 = Short, 2 = Long). Short mode maximum distance is limited to 1.3m but results in a better ambient immunity. Long mode can range up to 4 m in the dark with a timing budget of200 ms.

RangeStatus

Returns the RangeStatus of the device.

Roi

Gets or sets the Roi, the position of which is centered about the optical center. The smallest acceptable ROI size is 4. The receiving SPAD array of the sensor consists of 16x16 SPADs which covers the full FoV. It is possible to program a smaller ROI, with a smaller number of SPADs, to reduce the FoV for applications which require a narrow FoV.

RoiCenter

This function programs the new user ROI center, please to be aware that there is no check in this function if the ROI center vs ROI size is out of border.

SensorId

Gets the sensor ID which must be 0xEEAC.

SigmaThreshold

This function programs a new sigma threshold. The default value is 15 mm.

SignalPerSpad

Returns the signal per SPAD in kcps/SPAD.

SignalRate

Returns the signal in kcps.

SignalThreshold

Gets or sets a new signal threshold in kcps where the default is 1024 kcps.

SpadNb

Returns the current number of enabled SPADs.

TimingBudgetInMs

Gets or sets the timing budget in ms. The predefined values are 15, 33, 20, 50, 100, 200, and 500 TimingBudget. This property must be set after changing the Precision

Xtalk

Gets or sets the crosstalk correction value in cps. This is the number of photons reflected back from the cover glass in cps.

Methods

CalibrateOffset(Length)

This function performs the offset calibration and programs the offset compensation into the device. Target reflectance should be grey17%.

CalibrateXtalk(Length)

This function performs the xtalk calibration and programs the xtalk compensation to the device. Target reflectance should be grey 17%.

ChangeI2CAddress(I2cDevice, Byte)

The sensor can be changed for other I2C Address, this function allows to change it

ClearInterrupt()

This function clears the interrupt to be called after a ranging data reading, to arm the interrupt for the next data ready event.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetDistance()

Gets the measured distance. If ranging has not been started yet, the function will automatically start the ranging feature of the device.

SetDistanceThreshold(Length, Length, WindowDetectionMode)

This function programs the threshold detection mode. For example: SetDistanceThreshold(dev,100,300, WindowDetectionMode.Below): below 100 SetDistanceThreshold(dev,100,300, WindowDetectionMode.Above): above 300 SetDistanceThreshold(dev,100,300, WindowDetectionMode.Out): out-of-window SetDistanceThreshold(dev,100,300, WindowDetectionMode.In): in window

StartRanging()

This function starts the ranging distance operation which is continuous. The clear interrupt has to be done after each "get data" to allow the interrupt to be raised when the next data are ready. 1 = active high (default), 0 =active low. If required, use InterruptPolarity to change the interrupt polarity.

StartTemperatureUpdate()

This function performs the temperature calibration. If the sensor has been stopped for a long time, it is recommended to perform the temperature update prior to restarting the ranging. By default, the sensor can adequately handle any temperature change as long as it is running, but if the sensor is stopped for an extended period of time, a temperature compensation is advised.

StopRanging()

This function stops the ranging.

Applies to