◆ RangeProfile
Short range - 1.3 m Middle range - 3 m Long range - 4 m
◆ VL53L1Xs()
VL53L1Xs::VL53L1Xs |
( |
HardwareSerial * |
hardwareSerial = 0 , |
|
|
bool |
displayWarnings = false |
|
) |
| |
Constructor
- Parameters
-
hardwareSerial | - optional additional serial port, for example for Bluetooth. |
displayWarnings | - display ranging warnings. |
◆ ~VL53L1Xs()
Destructor
Destructor
- Parameters
-
displayWarnings | - display ranging warnings. |
◆ add()
Add a sensor. It assigns sensor 0 to the first sensor, 1 to the second, etc. This number ("sensorNumber") is used to call other functions for this sensor.
- Parameters
-
pin | - Sensor's enable pin. |
pin | - Sensor's enable pin. 0xFF - not used. Sensor will be enabled if this pin if left unconnected due to internal pull-up. |
i2c_add | - I2C address. 0x29 must not be used to any other I2C device, even if not used for any VL53L1X. |
Add a sensor. It assigns sensor 0 to the first sensor, 1 to the second, etc. This number ("sensorNumber") is used to call other functions for this sensor.
- Parameters
-
pin | - Sensor's enable pin. |
pin | - Sensor's enable pin. 0xFF - not used. Sensor will be enabled if this pin if left unconnected due to internal pull-up. |
i2c_addr | - I2C address. 0x29 must not be used to any other I2C device, even if not used for any VL53L1X. |
◆ begin()
void VL53L1Xs::begin |
( |
boolean |
verbose = false | ) |
|
Starts sensors. It must be called after all the add() calls.
- Parameters
-
continuousMeasurement | - Non-stop measuring. |
verbose | - Detailed display. |
Starts sensors. It must be called after all the add() calls.
- Parameters
-
verbose | - Detailed display. |
◆ distance()
Distance measurement
- Parameters
-
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. |
- Returns
- - Distance in mm.
◆ rangeProfileSet()
Ranging profile
- Parameters
-
value | - profile |
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. 0xFF - all sensors. |
◆ roi()
Region of interest, can used to set FOV (field of view). The minimum ROI size is 4x4, maximum (and default) 16x16. Use roiCenter() to find center.
- Parameters
-
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. 0xFF - all sensors. |
TopLeftX | - top left X of the FOV, 0-15. |
TopLeftY | - top left X of the FOV, 0-15. |
BottomRightX | - bottom right X of the FOV, 0-15. |
BottomRightY | - bottom right X of the FOV, 0-15. |
Region of interest, can used to set FOV (field of view). The minimum ROI size is 4x4, maximum (and default) 16x16.
- Parameters
-
sensorNumber | - Sensor's ordinal number. Each call of function add() assigns a increasing number to the sensor, starting with 0. |
TopLeftX | - top left X of the FOV, 0-15. |
TopLeftY | - top left X of the FOV, 0-15. |
BottomRightX | - bottom right X of the FOV, 0-15. |
BottomRightY | - bottom right X of the FOV, 0-15. |
◆ roiCenter()
ROI center. Due to assembly tolerances, the optical center of the device can vary.
- Parameters
-
xCenter | - returns center's x coordinate, 0-15. |
yCenter | - returns center's y coordinate, 0-15. |
◆ stress()
void VL53L1Xs::stress |
( |
BreakCondition |
breakWhen = 0 | ) |
|
Stress test
- Parameters
-
breakWhen | - A function returning bool, without arguments. If it returns true, the stress() will be interrupted. |
◆ test()
void VL53L1Xs::test |
( |
BreakCondition |
breakWhen = 0 | ) |
|
Test
- Parameters
-
breakWhen | - A function returning bool, without arguments. If it returns true, the test() will be interrupted. |
The documentation for this class was generated from the following files:
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/lib/mrm-lid2/src/mrm-lid2.h
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/lib/mrm-lid2/src/mrm-lid2.cpp