VL53L01 optical center register setting
Hi.
Please help me with VL53l1.
1) Is it possible to read distance from individual pixel or is it only some kind of interpolation of the 4 x 4 region?
2) Is there a description of registers which should be modified (and how they should be modified) to set size and coordinates of ROI (or pixel if it is possible)? I managed to run en.STSW-IMG009, however it doesn’t have the above function (it is possible to set size only, but not coordinates). I tried to run en.STSW-IMG007 and failed.
Light lib has the following function:
VL53L1X_ERROR VL53L1X_SetROI(VL53L1_Dev_t dev, uint16_t X, uint16_t Y)
{
uint8_t OpticalCenter;
VL53L1X_ERROR status = 0;
status =VL53L1_RdByte(&dev, VL53L1_ROI_CONFIG__MODE_ROI_CENTRE_SPAD, &OpticalCenter);
if (X > 16)
X = 16;
if (Y > 16)
Y = 16;
if (X > 10 || Y > 10){
OpticalCenter = 199;
}
status = VL53L1_WrByte(&dev, ROI_CONFIG__USER_ROI_CENTRE_SPAD, OpticalCenter);
status = VL53L1_WrByte(&dev, ROI_CONFIG__USER_ROI_REQUESTED_GLOBAL_XY_SIZE,
(Y - 1) << 4 | (X - 1));
return status;
}What is the OpticalCenter and how can I calculate it?
Thanks.
