Library containing Crazyflie 2.0 sensors drivers: - LPS25H (barometer) - MPU9250 (IMU) - PMW3901 (optical flow) - VL53L0X (range)

Dependents:   Drones-Controlador controladoatitude_cteste Drone_Controlador_Atitude optical_test

Revision:
11:b3a7164c4e12
Child:
12:2bbe233d25fb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VL53L0X/VL53L0X.h	Mon Sep 24 17:25:20 2018 +0000
@@ -0,0 +1,44 @@
+#ifndef VL53L0X_h
+#define VL53L0X_h
+
+#include "mbed.h"
+
+/** VL53L0X (lidar sensor) class
+ *
+ * Example code (print pressure and altitude data on serial port every 0.2 second):
+ * @code
+ * #include "mbed.h"
+ * #include "USBSerial.h"
+ * #include "VL53L0X.h"
+ *
+ * USBSerial pc;
+ * VL53L0X lidar(PC_9,PA_8);
+ * 
+ * int main() 
+ * {
+ *     if(!lidar.init())
+ *     {
+ *          pc.printf("Failed to detect and initialize lidar on I2C bus!");    
+ *          while(1);
+ *     }
+ *     while(1)
+ *     {
+ *          lidar.read();
+ *          pc.printf("Distance   [m]: %6.2f \n\n", lidar.z);
+ *          wait(0.2);
+ *     }
+ * }
+ * @endcode
+ * (Need to target to NUCLEO-F401RE board platform)
+ */
+class VL53L0X
+{
+    public:
+        /** Class constructor */
+        VL53L0X(PinName sda, PinName scl);
+    private:
+        /** I2C bus */
+        I2C i2c;
+};
+
+#endif
\ No newline at end of file