Basic HelloWorld on how to use LidarLitev2

Dependencies:   LidarLitev2 mbed

Revision:
1:b6f905ba0c2a
Parent:
0:1c42ae9ef9a2
diff -r 1c42ae9ef9a2 -r b6f905ba0c2a main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 22 21:39:34 2015 +0000
@@ -0,0 +1,19 @@
+#include "LidarLitev2.h"
+
+
+LidarLitev2 Lidar(p28, p27);
+Serial pc(USBTX,USBRX);
+
+
+Timer dt;
+int main()
+{   
+    
+    pc.baud(115200);
+    Lidar.configure();
+    dt.start();
+    while(1){
+         pc.printf("distance = %d cm frequency = %.2f Hz\n", Lidar.distance(), 1/dt.read());
+         dt.reset();
+    }
+}
\ No newline at end of file