ST Expansion SW Team / X_NUCLEO_6180

Dependencies:   Vl6180

Dependents:   VL6180_MB2_1sensor_singleshot_poll VL6180_MB5_1sensor_singleshot_wait VL6180_MB2_4sensors_interrupts VL6180_MB515_4sensors_interrupts ... more

Files at this revision

API Documentation at this revision

Comitter:
charlesmn
Date:
Tue Nov 10 16:10:34 2020 +0000
Parent:
2:04a5cf34e1a9
Commit message:
Used the correct version of RangeSensor.h which allows the program to build. We want the RangeSensor.h that includes get_distance().

Changed in this revision

Vl6180.lib Show annotated file Show diff for this revision Revisions of this file
XNucleo6810.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Vl6180.lib	Tue Nov 10 10:19:14 2020 +0000
+++ b/Vl6180.lib	Tue Nov 10 16:10:34 2020 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/ST-Expansion-SW-Team/code/Vl6180/#bc1d979ae392
+https://os.mbed.com/teams/ST-Expansion-SW-Team/code/Vl6180/#b01812cb5250
--- a/XNucleo6810.cpp	Tue Nov 10 10:19:14 2020 +0000
+++ b/XNucleo6810.cpp	Tue Nov 10 16:10:34 2020 +0000
@@ -100,7 +100,12 @@
         printf("Sensor centre present\n\r");
         n_dev++;
     }
-    wait_ms(50);  // NEEDS A DELAY BETWEEN SENSORS
+#if (MBED_VERSION  > 60300) 
+        thread_sleep_for(50);
+#else
+        wait_ms(50);  // NEEDS A DELAY BETWEEN SENSORS
+#endif
+
     // select the second VL53l1. It will have i2c address of 0x52. Set the i2c address to
     //NEW_SENSOR_LEFT_ADDRESS
     
@@ -118,7 +123,11 @@
         printf("Sensor left present\n\r");
         n_dev++;
     }
-  wait_ms(50);  
+#if (MBED_VERSION  > 60300) 
+        thread_sleep_for(50);
+#else
+        wait_ms(50);  // NEEDS A DELAY BETWEEN SENSORS
+#endif
      // select the 3rd VL53l1. It will have i2c address of 0x52. Set the i2c address to
     //NEW_SENSOR_RIGHT_ADDRESS 
     printf("Sensor right init \n\r");
@@ -137,7 +146,11 @@
         printf("Sensor right present\n\r");
         n_dev++;
     }
-wait_ms(50);
+#if (MBED_VERSION  > 60300) 
+    thread_sleep_for(50);
+#else
+    wait_ms(50);  // NEEDS A DELAY BETWEEN SENSORS
+#endif
 
      // select the 4th VL53l1. It will have i2c address of 0x52. Set the i2c address to
     //NEW_SENSOR_BOTTOM_ADDRESS 
@@ -155,7 +168,11 @@
         printf("Sensor bottom present\n\r");
         n_dev++;
     }
-wait_ms(50);
+#if (MBED_VERSION  > 60300) 
+    thread_sleep_for(50);
+#else
+    wait_ms(50);  // NEEDS A DELAY BETWEEN SENSORS
+#endif
     if (n_dev == 0) {
         return 1;
     } else {