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.
Fork of VL53L1X_Pololu by
main.cpp
00001 #include "mbed.h" 00002 #include "VL53L1X.h" 00003 00004 Serial pc(USBTX,USBRX); 00005 bool s1_init = false; 00006 bool s2_init = false; 00007 bool s3_init = false; 00008 bool s4_init = false; 00009 VL53L1X sensor1(D14, D15, D0); 00010 VL53L1X sensor2(D14, D15, D1); 00011 VL53L1X sensor3(D14, D15, D2); 00012 VL53L1X sensor4(D14, D15, D3); 00013 00014 int main() 00015 { 00016 sensor1.initReading(0x25,50000); 00017 sensor2.initReading(0x27,50000); 00018 sensor3.initReading(0x35,50000); 00019 sensor4.initReading(0x37,50000); 00020 00021 while(1) 00022 { 00023 pc.printf("%d, ", sensor1.readFromOneSensor()); 00024 pc.printf("%d, ", sensor2.readFromOneSensor()); 00025 pc.printf("%d, ", sensor3.readFromOneSensor()); 00026 pc.printf("%d\r\n", sensor4.readFromOneSensor()); 00027 } 00028 }
Generated on Sun Jul 17 2022 12:39:02 by
