Use sensor class

Dependencies:   VL53L3CX_mbed

Files at this revision

API Documentation at this revision

Comitter:
johnAlexander
Date:
Fri Apr 30 15:01:09 2021 +0000
Parent:
2:6cc14a15a98c
Commit message:
Align with MbedOS v6.10

Changed in this revision

Main.cpp Show annotated file Show diff for this revision Revisions of this file
VL53L3CX_mbed.lib Show annotated file Show diff for this revision Revisions of this file
VL53L3_Lib.lib Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 6cc14a15a98c -r 1f36ecdad3c4 Main.cpp
--- a/Main.cpp	Tue Nov 03 15:17:16 2020 +0000
+++ b/Main.cpp	Fri Apr 30 15:01:09 2021 +0000
@@ -13,12 +13,12 @@
  */
  
 #include <stdio.h>
+#include <time.h>
 
 #include "mbed.h"
 //#include "NoShield53L3.h"
-#include "vl53lx_class.h"
+#include "vl53l3_class.h"
 #include "vl53L3_I2c.h"
-#include <time.h>
 
 
 // define i2c mcu pins
@@ -26,8 +26,12 @@
 #define I2C_SCL   D15 
 
 //static NoShield53L3 *board=NULL;
-static VL53LX *sensor = NULL;
-Serial pc(SERIAL_TX, SERIAL_RX); 
+static VL53L3 *sensor = NULL;
+#if (MBED_VERSION  > 60300)
+    UnbufferedSerial  pc(USBTX, USBRX);
+#else
+    Serial pc(SERIAL_TX, SERIAL_RX);
+#endif
 
 
 
@@ -45,7 +49,7 @@
     int status;
     uint16_t wordData;
     
-    DigitalOut xshutdown(D7);
+    DigitalOut xshutdown(D8);
     
 
     static VL53LX_MultiRangingData_t RangingData;
@@ -58,7 +62,7 @@
     
     /* no expansion board so don't use stmpe1600 */
 //    board = NoShield53L3::instance(dev_I2C, A2, D8, D2);
-    sensor = new VL53LX(dev_I2C, &xshutdown, A2);
+    sensor = new VL53L3(dev_I2C, &xshutdown, A2);
     
     printf("sensor created!\r\n");
 
diff -r 6cc14a15a98c -r 1f36ecdad3c4 VL53L3CX_mbed.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VL53L3CX_mbed.lib	Fri Apr 30 15:01:09 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/ST-Expansion-SW-Team/code/VL53L3CX_mbed/#39a9cd3c85f2
diff -r 6cc14a15a98c -r 1f36ecdad3c4 VL53L3_Lib.lib
--- a/VL53L3_Lib.lib	Tue Nov 03 15:17:16 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/users/johnAlexander/code/VL53L3_Lib/#316175f392f7
diff -r 6cc14a15a98c -r 1f36ecdad3c4 mbed-os.lib
--- a/mbed-os.lib	Tue Nov 03 15:17:16 2020 +0000
+++ b/mbed-os.lib	Fri Apr 30 15:01:09 2021 +0000
@@ -1,1 +1,1 @@
-https://github.com/armmbed/mbed-os/#aa70f680bb5755e8fea3f93fc6e04d9b3de235bb
+https://github.com/armmbed/mbed-os/#9738b27c7df897c29e9769911d6794ba3e5b3f19