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: ATP3012 mbed a HMC US015_2 getGPS
Revision 1:1c4c7cd015e8, committed 2021-12-03
- Comitter:
- ushiroji
- Date:
- Fri Dec 03 08:24:39 2021 +0000
- Parent:
- 0:99f4fe3e21c6
- Commit message:
- first version
Changed in this revision
| Function.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Function.h Wed Dec 01 08:14:01 2021 +0000
+++ b/Function.h Fri Dec 03 08:24:39 2021 +0000
@@ -30,7 +30,7 @@
xbee.printf("distance=%d\r\n", distance); //距離出力
Ultra=0;//超音波off
- if(distance < 500) {
+ if(distance < 1500) {
return 1;
}
else {
--- a/main.cpp Wed Dec 01 08:14:01 2021 +0000
+++ b/main.cpp Fri Dec 03 08:24:39 2021 +0000
@@ -6,14 +6,10 @@
while(1) {
Move('2', 0.3);
while(FrontGet()) {
- xbee.printf("front get\n\r");
Move('1', 0); //停止
- xbee.printf("mortor mode:1 speed:0\n\r");
- Move('4', 0.3); //時計回り回転
- xbee.printf("mortor mode:4 speed:0.5\n\r");
- wait(1);
+ Move('4', 0.2); //時計回り回転
+ wait(0.5);
Move('1', 0); //回転停止
- xbee.printf("mortor mode:1 speed:0\n\r");
}
}
}