Data Sheet

DocID031478 Rev 1 13/28
UM2356 Ranging API function descriptions
28
Example:
Detectionconfig.DetectionMode = 1
Detectionconfig.Distance.CrossMode = 3
Detectionconfig.IntrNoTarget = 0
Detectionconfig.Distance.High = 1000
Detectionconfig.Distance.Low = 100
Status = VL53L1_SetThresholdConfig(&VL53L1Dev, &detectionConfig );
This function is used to program the device to report ranging only when an object is
detected within 10 cm and 1 m (as in this example).
The function VL53L1_GetThresholdConfig() allows the programmed report threshold
configuration to be obatined.
2.5.6 Region of Interest (ROI) setting
The receiving SPAD array of the sensor includes 16x16 SPADs which cover the full field of
view (FoV). It is possible to program a smaller region of interest (ROI), with a smaller
number of SPADs, to reduce the FoV.
To set a ROI different than the default 16x16 one, the user can call the
VL53L1_SetUserROI() function.
The ROI is a square or rectangle defined by two corners: top left and bottom right.
Four coordinates are used to localize these two corners on the full SPAD array:
TopLeftX
TopLeftY
BotRightX
BotRightY
These coordinates are part of the VL53L1_UserRoi_t structure.
The user has to define the ROI coordinate values in the structure, and call the driver
function to apply the ROI change.
The minimum ROI size is 4x4.
An example of an ROI setting is given in Figure 6.