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
Diff: main.cpp
- Revision:
- 11:8061348a85eb
- Parent:
- 10:b190babac114
- Child:
- 12:e9d22bda3be6
--- a/main.cpp Mon Dec 09 10:43:47 2019 +0000 +++ b/main.cpp Thu Dec 12 07:28:39 2019 +0000 @@ -28,7 +28,7 @@ TB6612 left1(p25,p17,p16); //モーターピン TB6612 right1(p26,p19,p18); //モーターピン Serial xbee(p13,p14); //xbee - +DigitalIn flight(p23); //フライトピン @@ -39,16 +39,32 @@ Sb612switch=0; //焦電off wait(1); Ultra=0;//超音波off - + FET=1;//FET off printf("CanSat-B_Start!\r\n"); - + flight==1;//flight pin ついてる //FET - - FET=1; - wait(10); - FET=0; - wait(10); - + while(1){ + if(flight==1) { + wait(10); + printf("mada\r\n"); + } + else{ + if(flight==1) { + wait(10); + printf("madamada\r\n"); + } + else{ + printf("yattar\r\n"); + FET=0; + wait(10); + FET=1; + wait(10); + printf("FET End!\r\n"); + + break; + } + } + } //以下GPS @@ -60,7 +76,7 @@ pc.printf("GPS Start\n"); xbee.printf("s\n"); - while(1) { + while(1){ if(gps.getgps()){ pc.printf("(%lf,%lf)\r\n",gps.latitude,gps.longitude);//緯度と経度を表示