A sample program getting measurements from a VL53L1CB ToF sensors which are connected thru a shield to the STM32F401. Copes with one sensor. Polling mode. VL53L1 is operated in multizone mode. MBed V6.
Dependencies: X_NUCLEO_53L1A2
Diff: main.cpp
- Revision:
- 1:49e2fad70dfe
- Parent:
- 0:50b05f035d13
- Child:
- 2:ef5e40bad526
--- a/main.cpp Mon Oct 26 13:34:03 2020 +0000 +++ b/main.cpp Fri Nov 06 15:01:59 2020 +0000 @@ -86,10 +86,8 @@ status = Sensor->vl53L1_DataInit(); status = Sensor->vl53L1_StaticInit(); status = Sensor->vl53L1_SetPresetMode( VL53L1_PRESETMODE_MULTIZONES_SCANNING); -// status = Sensor->vl53L1_SetDistanceMode( VL53L1_DISTANCEMODE_LONG); -// status = Sensor->vl53L1_SetMeasurementTimingBudgetMicroSeconds( 100 * 1000); -// status = Sensor->vl53L1_SetInterMeasurementPeriodMilliSeconds( 100); - + status = Sensor->vl53L1_SetDistanceMode( VL53L1_DISTANCEMODE_LONG); + VL53L1_RoiConfig_t roiConfig; roiConfig.NumberOfRoi =3;