VL53L0X Time of Flight Sensor
Measure distance to a target object
Simulink Coder Support Package for STMicroelectronics Nucleo Boards / Sensors
The VL53L0X Time of Flight Sensor block measures the distance to a target object for a complete field of view (FOV = 25 degrees). This block also provides the option to select one of four ranging modes based on your requirements.
XSHUT connection is required for VL53L0X sensor. Connect the XSHUT pin to vcc.
Distance — Object distance
The Distance port outputs the target object distance in millimeters
I2C module — Module for communication
Specify the module on the board that you are using for I2C communication.
I2C address — I2C address of sensor
The I2C address of the VL53L0X sensor from which the block reads the
values. You can configure this value. The range of I2C address is from
Ranging Mode — Distance ranging mode of VL53L0X sensor
Default (default) |
High accuracy |
Long range |
Select the distance ranging mode for measuring the distance to the target object. The four ranging modes available are shown in this table.
|Ranging mode||Timing budget||Typical max range||Typical application|
|Default||30 ms||1.2 m||standard|
|High accuracy||200 ms||2 m||precise measurement|
|Long range||33 ms||1.2 m||long ranging for dark conditions|
|High speed||20 ms||1.2 m||high speed where accuracy is not priority|
The timing budget is the time taken by the sensor to perform one range measurement.
Sample time — Time interval to read data
-1 (default) | positive integer
Specify how often this block reads the data from the VL53L0X sensor. When
you set this parameter to
-1, Simulink determines the
best sample time for the block based on the block context within the
Introduced in R2023a