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 mbedTimer SDFileSystem MU2 GPS
Diff: main.cpp
- Revision:
- 5:6d0de80387cf
- Parent:
- 4:0d087e3f731d
- Child:
- 7:c94dd56226a1
diff -r 0d087e3f731d -r 6d0de80387cf main.cpp
--- a/main.cpp Tue Aug 06 08:54:58 2019 +0000
+++ b/main.cpp Wed Aug 07 10:05:17 2019 +0000
@@ -4,6 +4,7 @@
#include "inletclose.h"
//#include "GPS.h"
+
MU2 MuPort(p28,p27);
SDFileSystem sd(p11, p12, p13, p14, "sd");
//GPS gps(p13,p14);
@@ -20,13 +21,14 @@
DigitalOut myled3(LED3);
DigitalOut myled4(LED4);
+
int main()
{
- wait(3);
+ wait(0.5);//フライトピン抜けてから溶断までの時間
//FILE* fp1= fopen("/sd/cansat/log3.txt", "w");
- FILE* fp2= fopen("/sd/cansat/gpsdata11.csv", "w");
+ FILE* fp2= fopen("/sd/cansat/gpsdata0806_2.csv", "w");
/*if(fp1 == NULL || fp2 == NULL)
{
@@ -34,6 +36,8 @@
(fp2 == NULL) ? fprintf(stderr, "fname2 open error.\n") : fclose(fp2);
return -1;
}*/
+
+ //fprintf(fp2, "CanSat Start!\n");
//溶断機構部分
@@ -42,7 +46,7 @@
//fprintf(fp1, "Fire!!\r\n");
//FIRE=1;
myled=1;//テストようにLED光らせてる
- wait(5);//溶断にかかる時間TBD秒
+ wait(3);//溶断にかかる時間TBD秒
//FIRE=0;
myled=0;
@@ -54,7 +58,7 @@
int i=0;
int timer=0;
- //fprintf(fp1, "GPS start!\r\n");
+ //fprintf(fp2, "GPS start!!\n");
while(1)
{
@@ -77,6 +81,7 @@
error("Could not open file for write\n");
}*/
+
fprintf(fp2, "%s\n",getGPS);
//fclose(fp);
@@ -86,6 +91,7 @@
i=0;
}
+
i++;
if(timer>10)//落下開始してからTBD秒後whileを抜ける.
{