Sensor US

Dependencies:   HCSR04 mbed

Files at this revision

API Documentation at this revision

Comitter:
oscarvzfz
Date:
Mon Nov 23 23:06:34 2015 +0000
Commit message:
bosdjbvdv;

Changed in this revision

HCSR04.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp 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/HCSR04.lib	Mon Nov 23 23:06:34 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/rabad1/code/HCSR04/#5461d44a187c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Nov 23 23:06:34 2015 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "HCSR04.h"
+
+Serial pc(USBTX,USBRX);
+HCSR04 rangeFinder(p14,p13);
+float range;
+ 
+int main() { 
+pc.baud(9600);
+while(1) {
+    rangeFinder.startMeas();
+    wait(0.1);
+     rangeFinder.getMeas(range);
+    printf("range = %f\n\r", range);
+        
+
+} 
+} 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Nov 23 23:06:34 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file