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
Diff: main.cpp
- Revision:
- 0:a0e5d6f42ee8
- Child:
- 1:b86370871528
diff -r 000000000000 -r a0e5d6f42ee8 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jul 02 08:50:45 2020 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+DigitalOut cond[]={LED1,LED2,LED3,LED4};
+Serial gs(USBTX,USBRX); // for ground station
+
+int main() {
+ gs.baud(9600);
+ gs.printf("From Sat : Operation Start...\r\n");
+ int flag = 0; // condition
+ float sattime=0.0,btvol,temp; //Voltage, Temerature
+ for(int i=0; i<100; i++){
+ //Sensing HK data(dummy)
+ btvol = 3.7;
+ temp = 28.5;
+
+ //Transmitting HK data
+ gs.printf("HEPTASAT::Condition = %d, Time = %f [s], batVol = %.2f [V],Temp = %.2f [C]\r\n",flag,sattime,btvol,temp);
+
+ //Condition
+ cond[0] = 1;
+
+ //Operation Interval
+ wait(1.0);
+ sattime = sattime+1.0;
+ }
+ gs.printf("From Sat : Operation Stop...\r\n");
+}
\ No newline at end of file