VL53L1X
Description
The VL53L1X object implements a driver for the ST VL53L1X laser-ranging sensor. The parent of a VL53L1X object has to be a corresponding I2cBus object.
This object was introduced in InCore 2.7.
- › Inherits:
Overview
Properties
Methods
Signals
Enumerations
Properties
address
This property holds the I2C address of the sensor.
- › Type:
SignedInteger
- › Default:
41- › Signal:
addressChanged()
- › Attributes:
Writable
bus
This property holds the index of the I2C bus which the sensor is attached to.
- › Type:
SignedInteger
- › Default:
0- › Signal:
busChanged()
- › Attributes:
Writable
distance
This property holds the last distance value measured by the sensor.
- › Type:
UnsignedInteger
- › Signal:
distanceChanged()
- › Attributes:
Readonly, Requires Polling
distanceMode
This property holds the distance mode in which the sensor should operate.
- › Type:
- › Default:
- › Signal:
distanceModeChanged()
- › Attributes:
Writable
error
This property holds the most recently occurred error or VL53L1X.NoError if no error occurred. If the same error occurs multiple times this property does not change. Use the errorOccurred() signal to detect multiple occurrences of the same error.
- › Type:
- › Signal:
errorChanged()
- › Attributes:
Readonly
errorString
This property holds the current human readable error string corresponding to the current value in the error property. It may include additional information such as failure reasons or locations.
- › Type:
String
- › Signal:
errorStringChanged()
- › Attributes:
Readonly
interMeasurementPeriod
This property holds the time between measurements in ms (has to be >= measurementTimingBudget).
- › Type:
SignedInteger
- › Default:
-1- › Signal:
interMeasurementPeriodChanged()
- › Attributes:
Writable
measurementTimingBudget
This property holds the duration of a measurement in ms.
- › Type:
SignedInteger
- › Default:
-1- › Signal:
measurementTimingBudgetChanged()
- › Attributes:
Writable
offset
This property holds an offset added to the distance.
- › Type:
SignedInteger
- › Default:
0- › Signal:
offsetChanged()
- › Attributes:
Writable
Methods
calibrate(SignedInteger distance)
- › Returns:
SignedInteger
pollDistance()
This method polls the distance property. It is called automatically when using a Polling property modifier on this property and usually does not have to be called manually.
Signals
errorOccurred()
This signal is emitted whenever an error has occurred, regardless of whether the error property has changed or not. In contrast to the change notification signal of the error property this signal is also emitted several times if a certain error occurs several times in succession.
Enumerations
DistanceMode
Name |
Value |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Error
This enumeration describes all errors which can occur in VL53L1X objects. The most recently occurred error is stored in the error property.
Name |
Value |
Description |
|---|---|---|
|
|
No error occurred or was detected. |
|
|
Device not found. |
|
|
Kernel driver not available or accessible. |
|
|
Device boot timed out. |
|
|
Waiting for device interrupt failed. |
|
|
Could not read data from the sensor. |