mainまでいけました カメラのとこからコンパイルできません

Dependencies:   mbed CameraUS015sb612-3

Files at this revision

API Documentation at this revision

Comitter:
YUPPY
Date:
Fri Nov 22 08:52:55 2019 +0000
Parent:
5:5aa7223226df
Commit message:
yeah!

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Nov 22 05:55:36 2019 +0000
+++ b/main.cpp	Fri Nov 22 08:52:55 2019 +0000
@@ -13,7 +13,7 @@
 
 DigitalOut FET(p21);                //FET
 DigitalOut Ultra(p12);
-DigitalIn thermo(p20);     //焦電センサ↓
+DigitalOut thermo(p20);     //焦電センサ↓
 DigitalOut led(LED1);     
 Serial pc(USBTX,USBRX); // tx, rx  焦電センサ↑
 Serial xbee(p13, p14);
@@ -31,34 +31,8 @@
 
 int main() {   
     printf("CanSat-B_Start!\r\n");
-         //FET
-    FET = 0;
-    SW = 1;  //p21をhigh(3.3V)にする。 
-     while(1) {
-    if(flight==1) {
-        wait(10);
-        }
-        
-    else{
-        if(flight==1) {
-        wait(10);
-        }
-        else{
-        FET = 0;                       //FET、ニクロム線切断
-        wait(20);
-        FET = 1;
-        wait(12);
-        FET = 0;
-        wait(10);
-        FET = 1;
-        wait(12);
-        FET = 0; 
-        SW = 0;  //p21をlow(0V)にする。 
-    break;
-            }
-    }
-    }
     
+    printf("FETのコピーはここ");
       //以下GPS
      double a;
      double b;
@@ -127,11 +101,11 @@
   float th;
   Timer tm;
   pc.printf("start\r\n");
-
+  
   bool detected=false;
     thermo=0; //焦電off
     Ultra=1;//超音波on
-   
+         
          us015();
         if(distance<2000){//超音波反応
          Ultra=0;//超音波off
@@ -186,22 +160,12 @@
    //カメラ起動
    //カメラOFF
    //XBeeによりPCへ送信
-       if(receiveOK()=true){
-           printf("Unknown Creature has been descovered!\n");
-           }
+     printf("OK1はここに\r\n");
        //"OK"受信、ミッション終了
-       else if(receiveOK()=false){
-           printf("Continue!\n");
-           }
+      printf("OK2はここに\r\n");
        //"NO"受信、ミッション再開
 
-    else if(detected=false){
-        thermo=0;
-        motorFowardR();
-        wait(3);
-        Ultra=1;
-        motorFoward();
-        }
+     printf("NOはここに");
     
     //焦電センサー反応無し
     //焦電センサーOFF