Test temperature for the near space lab

Dependencies:   SDFileSystem mbed TEMP_Test

Dependents:   TEMP_Test

Fork of RGB_Test by Jeriah Bankson

Revision:
0:547856de255b
Child:
1:e0fc716e2394
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Mar 11 23:43:27 2016 +0000
@@ -0,0 +1,28 @@
+  //Authors: Tom, Nathan, Jeriah 
+#include "mbed.h"
+#include "RGBSensor.h"
+#include "SDFileSystem.h"
+#include "SDSave.h"
+
+SDFileSystem fs(PTE3,PTE1,PTE2,PTE4,"fs");//SDFileSystem object
+Timer t;
+
+int main() {//main function, calls other files to move temp,RGB,PV,UV all to one managable function
+    float lastTime = 0;
+    float interval = 0.5;
+    t.start();
+    if (mountFailure()) {
+        return -1; //end program with error status
+    }
+    uint16_t rgb[3];
+    while (t.read()>60) {
+      if (t.read()>lastTime+interval)  {
+          lastTime=t.read();
+          get_rgb(rgb);
+          writeDate_testRGB(lastTime,rgb[0],rgb[1],rgb[2]);//send data to writeData in SDsave.cpp
+          //we will get all rgb readings through an array, with the corresponding integers going in order red, green, blue
+        }
+    }
+    closeDataFile();
+} 
+      
\ No newline at end of file