A sample program to control one VL53L1 ToF sensor in multizone mode using polling to find out if a measurement is available. Mbed V6.3 but will run any MBed version by dropping replacing this one. Maint6 release.

Dependencies:   X_NUCLEO_53L1A2

Revision:
8:8f6490937346
Parent:
7:b5a4ad8ba844
Child:
9:0a3e1affe004
--- a/main.cpp	Fri Apr 30 14:16:46 2021 +0000
+++ b/main.cpp	Fri May 07 08:54:46 2021 +0000
@@ -1,5 +1,5 @@
 /*
- *  This VL53L1X Expansion board test application performs range measurements
+ *  This VL53L1CB Expansion board test application performs range measurements
  *  using the onboard embedded centre sensor, in multizone, polling mode.
  *  Measured ranges are ouput on the Serial Port, running at 115200 baud.
  *
@@ -159,7 +159,7 @@
                     if ((pMultiRangingData->RangeData[j].RangeStatus == VL53L1_RANGESTATUS_RANGE_VALID) || 
                         (pMultiRangingData->RangeData[j].RangeStatus == VL53L1_RANGESTATUS_RANGE_VALID_NO_WRAP_CHECK_FAIL))
                     {
-                        printf("*****************\t spiAddr=%d \t RoiNumber=%d   \t status=%d, \t D=%5dmm, \t Signal=%2.2f Mcps, \t Ambient=%2.2f Mcps \n",
+                        printf("*****************\t i2cAddr=0x%x \t RoiNumber=%d   \t status=%d, \t D=%5dmm, \t Signal=%2.2f Mcps, \t Ambient=%2.2f Mcps \n",
                         devSpiNumber,
                         RoiNumber,
                         pMultiRangingData->RangeData[j].RangeStatus,