as per name
Dependencies: VL53L1CB
Diff: main.cpp
- Revision:
- 2:c593079fec6a
- Parent:
- 1:9f70f022f5be
- Child:
- 4:64f1d9db74fa
--- a/main.cpp Tue Jun 15 07:58:58 2021 +0000 +++ b/main.cpp Wed Jun 16 12:38:58 2021 +0000 @@ -113,15 +113,6 @@ status = Sensor->VL53L1CB_SetSequenceStepEnable(VL53L1_SEQUENCESTEP_MM1, 0); status = Sensor->VL53L1CB_SetSequenceStepEnable(VL53L1_SEQUENCESTEP_MM2, 0); - - VL53L1_DeviceInfo_t device_info; - - // print out the sensor information. All VL53L1s are the same - status = Sensor->VL53L1CB_GetDeviceInfo(&device_info); - printf("device name %s \n",device_info.Name); - printf("device type %s \n",device_info.Type); - printf("device productType %x \n",device_info.ProductType); - // create interrupt handler and start measurements if (board->sensor_centre!= NULL) { @@ -182,6 +173,8 @@ VL53L1_MultiRangingData_t MultiRangingData; VL53L1_MultiRangingData_t *pMultiRangingData = NULL; + // polling for data. VL53L1CB_WaitMeasurementDataReady returns when data or after a timeout + // ignore the timeouts i.e. status != 0 while (true) { pMultiRangingData = &MultiRangingData; @@ -223,7 +216,7 @@ } // if (( no_of_object_found < 10 ) && ( no_of_object_found != 0)) } - +// wait_ms does not exist in later mbeds so create our own. #if (MBED_VERSION > 60300) extern "C" void wait_ms(int ms) {