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:ee90d231a709, committed 2020-03-02
- Comitter:
- maxnagazumi
- Date:
- Mon Mar 02 10:54:23 2020 +0000
- Commit message:
- newone;
Changed in this revision
diff -r 000000000000 -r ee90d231a709 hcsr04.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hcsr04.lib Mon Mar 02 10:54:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/ROBOSTEP_LIBRARY/code/hcsr04/#2aedff8578d2
diff -r 000000000000 -r ee90d231a709 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Mar 02 10:54:23 2020 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include"hcsr04.h"
+
+HCSR04 echo_1(PC_0,PC_12);//A
+HCSR04 echo_2(PA_15,PB_7);//A
+HCSR04 echo_3(PH_1,PB_0);// B
+HCSR04 echo_4(PC_3,PB_10);//B
+
+int main() {
+
+ printf("100");
+
+ double a=0,b=0,c=0,d=0;
+ while(1) {
+ echo_1.start();
+ echo_2.start();
+ echo_3.start();
+ echo_4.start();
+ wait(1);//minimum wait is 30msec
+ a=echo_1.get_dist_cm();
+ b=echo_2.get_dist_cm();
+ c=echo_3.get_dist_cm();
+ d=echo_4.get_dist_cm();
+ printf("a:%lf b:%lf c:%lf d:%lf\r\n",a,b,c,d);
+ }
+}
+
+
diff -r 000000000000 -r ee90d231a709 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 02 10:54:23 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file