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 00002 #include "mbed.h" 00003 #include "VL53L1X.h" 00004 #include <string> 00005 00006 Serial pc(USBTX,USBRX); 00007 bool s1_init = true; 00008 00009 //VL53L1X sensor1(PC_1,PC_0);//VL53L1X(PinName SDA, PinName SCL); 00010 //VL53L1X sensor1(PC_1,PC_0);//VL53L1X(PinName SDA, PinName SCL); 00011 //VL53L1X sensor1(PB_9,PB_8); 00012 //VL53L1X sensor1(P0_04,P0_05); 00013 00014 VL53L1X sensor1(P3_4,P3_5); 00015 int main() 00016 { 00017 00018 pc.baud (115200) ; 00019 s1_init = sensor1.begin(); 00020 00021 while(1) 00022 { 00023 //pc.printf("test\n\r"); 00024 //pc.printf("\rone.%d\n\r", s1_init); 00025 00026 printf("%u\n", (unsigned int)sensor1.getDistance()); 00027 wait(0.1); 00028 00029 } 00030 } 00031
Generated on Tue Aug 2 2022 20:27:10 by
1.7.2