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.
Dependencies: mbed
Revision 3:f7f92004d3ac, committed 2019-11-28
- Comitter:
- YUPPY
- Date:
- Thu Nov 28 06:53:24 2019 +0000
- Parent:
- 2:d3675b786834
- Commit message:
- s;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 27 14:17:36 2019 +0000
+++ b/main.cpp Thu Nov 28 06:53:24 2019 +0000
@@ -29,7 +29,7 @@
bool detected=false;
if(true){
th = thermo;
- if(th=1 && !detected) {//焦電反応ありの場合
+ if(th==1 && !detected) {//焦電反応ありの場合
detected=true;
pc.printf("human\r\n");
tm.reset();
@@ -37,17 +37,20 @@
}
else if(tm.read_ms()>5000){//焦電反応なしの場合
printf("not found\r\n");
+ thermo=0;
+ printf("焦電OFF\r\n");
+ Ultra=1;
+ printf("超音波ONっすよ!\r\n");
detected=false;
}
- }
+ }//if(true)
}if(distance>2000){//超音波反応遠い
printf("distance>2000だぞ\r\n");
}
- //if(true)
+ //while(1)
}
return 0;
-}
-
\ No newline at end of file
+}
\ No newline at end of file