Prints data bits, range status, and distance (mm)

Dependencies:   mbed

Fork of VL53L1X_Pololu by Jesus Fausto

Revision:
1:67ced5a2c689
Parent:
0:76ea242a637f
--- a/VL53L1X.h	Mon Jul 30 18:45:53 2018 +0000
+++ b/VL53L1X.h	Tue Jul 31 23:47:38 2018 +0000
@@ -1300,9 +1300,9 @@
     // check if sensor has new reading available
     // assumes interrupt is active low (GPIO_HV_MUX__CTRL bit 4 is 1)
     bool dataReady() { 
-    int isThereData = readReg(GPIO__TIO_HV_STATUS);
-    printf("%x\r\n", isThereData);
-    return (isThereData & 0x01) == 0; 
+        int isThereData = readReg(GPIO__TIO_HV_STATUS);
+        //printf("Data: %x\r\n", isThereData);            /* Returns 3 */
+        return (isThereData & 0x01) == 0; 
     }
 
     static const char * rangeStatusToString(RangeStatus status);