A.I.Mergence / Mbed 2 deprecated Test_ToF

Dependencies:   mbed VL53L0X

Files at this revision

API Documentation at this revision

Comitter:
kilianaim
Date:
Tue Sep 08 10:05:32 2020 +0000
Commit message:
Test_ToF

Changed in this revision

VL53L0X.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r ae101e0b7b83 VL53L0X.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VL53L0X.lib	Tue Sep 08 10:05:32 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/ST/code/VL53L0X/#8ac15bf6d635
diff -r 000000000000 -r ae101e0b7b83 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Sep 08 10:05:32 2020 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "VL53L0X.h"
+
+#define range_addr  (0x56)
+
+#define range1_XSHUT     D2
+#define VL53L0_I2C_SDA   D15
+#define VL53L0_I2C_SCL   D14
+
+//Serial pc(SERIAL_TX, SERIAL_RX);
+
+
+static DevI2C devI2c(VL53L0_I2C_SDA, VL53L0_I2C_SCL); 
+//static DigitalOut shutdown_pin(range1_XSHUT);
+//static VL53L0X tof(&devI2c, &shutdown_pin);
+ 
+
+
+// Capteurs TOF /*Contruct the sensors*/ 
+//static DigitalOut shutdown_pin(range1_XSHUT);
+//static VL53L0X tof(&devI2c, &shutdown_pin);
+
+ 
+int main()
+{
+    int status;
+    uint32_t mesure;
+    printf("Je commence\n");
+    // Initialisation de MultiTof
+    
+    //status = tof.init_sensor(range_addr);
+    
+    //time_up.attach(&verif_tof, 20);
+    while(1){
+        /*tof.get_distance(&mesure);
+        if (status == VL53L0X_ERROR_NONE) { 
+            printf("%d\t", mesure);
+        }
+        wait_us(10000);        // 10ms*/
+    }
+    
+ 
+}
+
diff -r 000000000000 -r ae101e0b7b83 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 08 10:05:32 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file