![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Sensor US
Revision 0:75937df46708, committed 2015-11-23
- Comitter:
- oscarvzfz
- Date:
- Mon Nov 23 23:06:34 2015 +0000
- Commit message:
- bosdjbvdv;
Changed in this revision
--- /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