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
Diff: main.cpp
- Revision:
- 3:ec2b7587be78
- Parent:
- 2:9bbc22250488
- Child:
- 4:975b0d9bd51b
--- a/main.cpp Sat Nov 06 03:20:14 2021 +0000
+++ b/main.cpp Wed Nov 10 08:36:55 2021 +0000
@@ -22,7 +22,7 @@
// パラシュート分離
wait(3);//電源ついてから3v3が安定するまで、秒数は適当、必要かもわからん
- while(flight_pin){
+ while(flight_pin){}
pc.printf("flight_pin nuketa");
xbee.printf("flight_pin nuketa");
wait(35);//ピン抜けてから地面につくまで70m/2.8(m/s)=25(s)余裕を見て+10s
@@ -31,7 +31,6 @@
xbee.printf("nichrome in");
wait(30);
nichrome=0;
- }
// 落下終了
@@ -60,15 +59,25 @@
}
else {
Move('1', 0);//停止
+ pc.printf("mortor mode:1 speed:0");
+ xbee.printf("mortor mode:1 speed:0");
Move('4', 0.5);//時計回りに回転
+ pc.printf("mortor mode:4 speed:0.5");
+ pc.printf("mortor mode:4 speed:0.5");
}
}
while(FrontGet()) {
Move('1', 0); //停止
+ pc.printf("mortor mode:1 speed:0");
+ xbee.printf("mortor mode:1 speed:0");
Move('4', 0.5); //時計回り回転
+ pc.printf("mortor mode:4 speed:0.5");
+ xbee.printf("mortor mode:4 speed:0.5");
wait(1);
Move('1', 0); //回転停止
+ pc.printf("mortor mode:1 speed:0");
+ xbee.printf("mortor mode:1 speed:0");
}
pc.printf("\n\rflag=xbee ni Input");
xbee.printf("\n\rspeed flag=");
@@ -82,6 +91,8 @@
as=0.5;
}
Move('2', as);
+ pc.printf("mortor mode:2 speed:%f",as);
+ xbee.printf("mortor mode:2 speed:%f",as);
catchGPS();
pc.printf("%lf %lf\r\n", gps.latitude, gps.longitude);
xbee.printf("now point(lati, long)=%lf , %lf\r\n", gps.latitude, gps.longitude);
@@ -100,5 +111,7 @@
pc.printf("End\r\n");
xbee.printf("End\r\n");
Move('1', 0); //停止
+ pc.printf("mortor mode:1 speed:0");
+ xbee.printf("mortor mode:1 speed:0");
return 0;
}