cansat_B 2019 / Mbed 2 deprecated tougou2*t*

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
seijakunouenimutou
Date:
Mon Dec 02 07:39:27 2019 +0000
Parent:
5:9b5899b06e2e
Commit message:
tougou2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Nov 29 19:08:28 2019 +0000
+++ b/main.cpp	Mon Dec 02 07:39:27 2019 +0000
@@ -98,6 +98,22 @@
                     fclose(fp);
                 }
                 }
+                 for(int i=0;i<2;i++) {
+        
+        int received_data = xbee.getc();
+   
+     if (received_data == 82 || received_data == 114){  //Rまたはr
+        xbee.printf("_________________________________________________________________________________________________________________________________\r\n");
+         if((fp=fopen("/local/d.txt","r"))!=NULL)
+            {
+                while ((c=fgetc(fp))!=EOF){
+                xbee.printf("%c",c);                    //再送
+                
+                }
+                fclose(fp);
+            }
+        }
+    }
                
               }else{//焦電反応なしの場合
               printf("not found!\r\n");