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 HMC6352 US015 TB6612FNG2 getGPS ATP3011
Diff: main.cpp
- Revision:
- 5:56eddb7b4a9e
- Parent:
- 3:74d0faefdd78
- Child:
- 6:1cda8471adc3
--- a/main.cpp Sun Oct 24 06:19:26 2021 +0000
+++ b/main.cpp Sun Oct 24 06:38:24 2021 +0000
@@ -28,16 +28,13 @@
catchGPS();
AngleGet();
回転();
- while(i >= 5) // 5°ずれると方向転換する
- {
-
-
- }
+
motor(1)
while (True) {
if (FrontGet()) {
MotorDriver(1, 0); //停止()
- Avoid();
+ MotorDriver(4, 0.5); //回転
+ continue;
}
else {
移動();
@@ -46,6 +43,6 @@
if ((next_CP_x - GPS_x)*(next_CP_x - GPS_x) + (next_CP_y = GPS_y)*(next_CP_y = GPS_y) < 5) { //試験で調整
break;
}
- }
+ }
// 行動フロー終了
- }
+}