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:
4:177d711cc20f
Parent:
3:d1a3d15a06ff
Child:
5:5916ff386a94
--- a/main.cpp	Sun Nov 08 15:06:04 2020 +0000
+++ b/main.cpp	Mon Nov 09 10:27:35 2020 +0000
@@ -13,7 +13,7 @@
 #include <stdio.h>
 
 #include "mbed.h"
-#include "XNucleo53L1A1.h"
+#include "XNucleo53L1A2.h"
 #include "ToF_I2C.h"
 #include <time.h>
 
@@ -24,7 +24,7 @@
 
 
 
-static XNucleo53L1A1 *board=NULL;
+static XNucleo53L1A2 *board=NULL;
 #if (MBED_VERSION  > 60300) 
 UnbufferedSerial  pc(SERIAL_TX, SERIAL_RX); 
 extern "C" void wait_ms(int ms);
@@ -57,7 +57,7 @@
     ToF_DevI2C *dev_I2C = new ToF_DevI2C(I2C_SDA, I2C_SCL);
     
     /* creates the 53L1A1 expansion board singleton obj */
-   board = XNucleo53L1A1::instance(dev_I2C, A2, D8, D2);
+   board = XNucleo53L1A2::instance(dev_I2C, A2, D8, D2);
     
     printf("board created!\r\n");