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: | Object |
---|
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: | DistanceMode |
---|---|
› Default: | VL53L1X.UnknownDistanceMode |
› 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: | Error |
---|---|
› 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 |
Signals¶
Enumerations¶
DistanceMode¶
Name | Value | Description |
---|---|---|
VL53L1X.UnknownDistanceMode |
0 |
|
VL53L1X.ShortDistanceMode |
1 |
|
VL53L1X.LongDistanceMode |
2 |
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 |
---|---|---|
VL53L1X.NoError |
0 |
No error occurred or was detected. |
VL53L1X.DeviceNotFound |
1 |
Device not found. |
VL53L1X.KernelDriverNotAvailable |
2 |
Kernel driver not available or accessible. |
VL53L1X.DeviceBootTimeout |
3 |
Device boot timed out. |
VL53L1X.WaitForInterruptFailed |
4 |
Waiting for device interrupt failed. |
VL53L1X.DataReadError |
5 |
Could not read data from the sensor. |