Christian Benitez / Mbed 2 deprecated VL53L1X_Pololu

Dependencies:   mbed

Fork of VL53L1X_Pololu by Jesus Fausto

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "VL53L1X.h"
00002 
00003 DigitalOut led1 (LED1);
00004 DigitalOut led2 (LED2);
00005 VL53L1X L (D14, D15);
00006 
00007 int main() {
00008     led1 = !led1;
00009     L.init();
00010     
00011     while (1) {
00012         L.startContinuous(10);
00013         printf("Distance (mm): %d\n", L.read());
00014         L.stopContinuous();
00015         wait_ms(.500);
00016     }
00017 }