For Nabeel

Dependencies:   mbed mbed-http ESP8266

Files at this revision

API Documentation at this revision

Comitter:
andcor02
Date:
Fri Jan 13 14:48:25 2017 +0000
Parent:
7:71da0dbf4400
Child:
9:607ee6e92552
Commit message:
K64F

Changed in this revision

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/main.cpp	Fri Jan 13 14:48:25 2017 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "hcsr04.h"
+
+ 
+DigitalOut myled(LED1);
+HCSR04  usensor(D8,D9);
+unsigned int dist;
+int main()
+{
+ 
+    while(1) {
+        usensor.start();
+        wait_ms(500); 
+        dist=usensor.get_dist_cm();
+        printf("\n\r cm:%ld",dist );
+ 
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 13 14:48:25 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/99b5ccf27215
\ No newline at end of file