Basic HelloWorld on how to use LidarLitev2

Dependencies:   LidarLitev2 mbed

Files at this revision

API Documentation at this revision

Comitter:
sventura3
Date:
Thu Oct 22 21:36:14 2015 +0000
Child:
1:b6f905ba0c2a
Commit message:
Basic HelloWorld on how to use LidarLitev2

Changed in this revision

Distance.cpp Show annotated file Show diff for this revision Revisions of this file
LidarLitev2.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Distance.cpp	Thu Oct 22 21:36:14 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LidarLitev2.lib	Thu Oct 22 21:36:14 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/sventura3/code/LidarLitev2/#7e6c07be1754
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 22 21:36:14 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file