Used to determine the thermal wake left behind a weather ballon on its accent towards the edge of space.

Dependencies:   DS1820 ExtendedTimer SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
croberts21
Date:
Thu Apr 19 05:39:33 2018 +0000
Parent:
1:abe448f0aae0
Commit message:
Final code for Thermal Wake Near Space project.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r abe448f0aae0 -r 1136b2fda54b main.cpp
--- a/main.cpp	Tue Apr 17 22:14:21 2018 +0000
+++ b/main.cpp	Thu Apr 19 05:39:33 2018 +0000
@@ -139,11 +139,11 @@
 
     //start timer and ticker
     t.start();
-    sampleTime.attach(&triggerCollection, 60); //write data every __ sec(s)
+    sampleTime.attach(&triggerCollection, 10); //write data every __ sec(s)
     timeToRead = true; //collect data at t = 0
     
     timeToSave = false;
-    saveTime.attach(&triggerSave, 300);
+    saveTime.attach(&triggerSave, 30);
     
     while (t.read() < (60 * 60 * 4))
     { 
@@ -184,6 +184,7 @@
             
             if(timeToSave)
             {
+                ledError = 1;
                 timeToSave = false;
                 fclose(out1);
                 fclose(out2);
@@ -191,6 +192,7 @@
                 out1 = fopen("/fs/arm1.txt","a");
                 out2 = fopen("/fs/arm2.txt","a");
                 out3 = fopen("/fs/tail.txt","a");
+                ledError = 0;
             }       
             
         }