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: HEPTA_SENSOR mbed HEPTA_EPS HEPTA_COM HEPTA_CDH
Revision 28:80d6576011e1, committed 2021-11-14
- Comitter:
- heptasat2021
- Date:
- Sun Nov 14 08:10:45 2021 +0000
- Parent:
- 27:ecdf196153cd
- Child:
- 29:3d7a0b3a1b8a
- Commit message:
- 20211114
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jul 22 02:27:10 2020 +0000
+++ b/main.cpp Sun Nov 14 08:10:45 2021 +0000
@@ -5,6 +5,7 @@
Serial gs(USBTX,USBRX); // for ground station
HEPTA_CDH cdh(p5, p6, p7, p8, "sd");
HEPTA_EPS eps(p16,p26);
+Timer sattime;
int rcmd = 0,cmdflag = 0; //command variable
//getting command and flag
@@ -30,14 +31,15 @@
gs.baud(9600);
gs.printf("From Sat : Operation Start...\r\n");
int flag = 0; // condition
- float sattime=0.0,btvol,temp; //Voltage, Temerature
+ float btvol,temp; //Voltage, Temerature
+ sattime.start();
receive(rcmd,cmdflag); //interupting by ground station command
for(int i = 0; i < 100; i++) {
//Sensing and Transmitting HK data
eps.vol(&btvol);
temp = 28.5;
- gs.printf("HEPTASAT::Condition = %d, Time = %f [s], batVol = %.2f [V],Temp = %.2f [C]\r\n",flag,sattime,btvol,temp);
+ gs.printf("HEPTASAT::Condition = %d, Time = %f [s], batVol = %.2f [V],Temp = %.2f [C]\r\n",flag,sattime.read(),btvol,temp);
//Condition
cond[0] = 1;
//Power Saving Mode
@@ -63,10 +65,7 @@
}
initialize();
}
-
- //Operation Interval
- wait(1.0);
- sattime = sattime+1.0;
}
+ sattime.stop();
gs.printf("From Sat : Operation Stop...\r\n");
}
\ No newline at end of file