Xbeeを実装、speakをfunctionに、rotate消した、calibrationで回るように、ゴール判定を消した
Dependencies: ATP3012 mbed a HMC US015_2 getGPS
Diff: main.cpp
- Revision:
- 19:6c56feca386d
- Parent:
- 18:da59a86eb246
- Child:
- 21:8469bb5e099f
diff -r da59a86eb246 -r 6c56feca386d main.cpp --- a/main.cpp Wed Dec 15 10:31:04 2021 +0000 +++ b/main.cpp Thu Dec 16 08:54:11 2021 +0000 @@ -68,7 +68,8 @@ //ちょっと走るのおわり //走りながらanglegetできたら、止まらない - direction = AngleGet(); + catchGPS(); + direction = AngleGet(next_CP_x,next_CP_y); xbee.printf("direction=%f\n\rrotation_start", direction); //角度調節 while(1) { @@ -82,7 +83,7 @@ else { Move('4', 0.19);//時計回りに回転 xbee.printf("now_angle=%lf\r\n", direction); - direction = AngleGet(); + direction = AngleGet(next_CP_x,next_CP_y); } }