Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "VL53L0X.h" 00003 00004 #define range_addr (0x56) 00005 00006 #define range1_XSHUT D2 00007 #define VL53L0_I2C_SDA D15 00008 #define VL53L0_I2C_SCL D14 00009 00010 //Serial pc(SERIAL_TX, SERIAL_RX); 00011 00012 00013 static DevI2C devI2c(VL53L0_I2C_SDA, VL53L0_I2C_SCL); 00014 //static DigitalOut shutdown_pin(range1_XSHUT); 00015 //static VL53L0X tof(&devI2c, &shutdown_pin); 00016 00017 00018 00019 // Capteurs TOF /*Contruct the sensors*/ 00020 //static DigitalOut shutdown_pin(range1_XSHUT); 00021 //static VL53L0X tof(&devI2c, &shutdown_pin); 00022 00023 00024 int main() 00025 { 00026 int status; 00027 uint32_t mesure; 00028 printf("Je commence\n"); 00029 // Initialisation de MultiTof 00030 00031 //status = tof.init_sensor(range_addr); 00032 00033 //time_up.attach(&verif_tof, 20); 00034 while(1){ 00035 /*tof.get_distance(&mesure); 00036 if (status == VL53L0X_ERROR_NONE) { 00037 printf("%d\t", mesure); 00038 } 00039 wait_us(10000); // 10ms*/ 00040 } 00041 00042 00043 } 00044
Generated on Fri Jul 15 2022 13:15:15 by
1.7.2