Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:2d72adb60ef0, committed 2014-07-02
- Comitter:
- oakx
- Date:
- Wed Jul 02 17:40:12 2014 +0000
- Commit message:
- oak;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HCSR04.lib Wed Jul 02 17:40:12 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/prabhuvd/code/HCSR04/#71da0dbf4400
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jul 02 17:40:12 2014 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "hcsr04.h"
+
+HCSR04 usensor(p26,p16);//trig pin,echo pin
+Serial pc(USBTX, USBRX);
+unsigned int dist;
+int main()
+{
+
+ while(1) {
+ usensor.start();
+ wait_ms(500);
+ dist=usensor.get_dist_cm();
+ pc.printf("Distance = %d cm\n",dist);
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 02 17:40:12 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file