cansat_B 2019 / Mbed 2 deprecated CanSatB2019_main_1213

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
YUPPY
Date:
Fri Dec 13 10:29:24 2019 +0000
Parent:
11:8061348a85eb
Commit message:
yeah

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Dec 12 07:28:39 2019 +0000
+++ b/main.cpp	Fri Dec 13 10:29:24 2019 +0000
@@ -28,9 +28,8 @@
 TB6612 left1(p25,p17,p16);            //モーターピン
 TB6612 right1(p26,p19,p18);           //モーターピン
 Serial xbee(p13,p14);                //xbee
-DigitalIn flight(p23);      //フライトピン
-
-                                    
+DigitalIn flight(p23);      //フライトピン(in)
+DigitalOut SW(p24);         //フライトピン(out)           
 
 int main()
 {
@@ -39,9 +38,11 @@
     Sb612switch=0; //焦電off
     wait(1);
     Ultra=0;//超音波off
+    SW=1;
+    flight==1;//flight pin ついてる
     FET=1;//FET off   
     printf("CanSat-B_Start!\r\n");
-    flight==1;//flight pin ついてる
+
      //FET
      while(1){
      if(flight==1) {
@@ -60,6 +61,7 @@
           FET=1;
           wait(10);
           printf("FET End!\r\n");
+          SW=0;
         
     break;
             }