Test temperature for the near space lab

Dependencies:   SDFileSystem mbed TEMP_Test

Dependents:   TEMP_Test

Fork of RGB_Test by Jeriah Bankson

Revision:
4:4b67d7667474
Parent:
2:04c2f253ec87
--- a/SDSave.cpp	Sat Mar 12 01:42:13 2016 +0000
+++ b/SDSave.cpp	Wed Mar 16 21:56:06 2016 +0000
@@ -1,4 +1,3 @@
-
 #include "SDFileSystem.h"
 #include "mbed.h"
 extern Serial pc;
@@ -13,22 +12,27 @@
         fprintf(fp, "Time (s)\t temperature (c)\t UV (mW/cm2)\t red (mW/cm2)\t green (mW/cm2)\t blue (mW/cm2)\n\r");
 }
 
-void createDataFile_testRGB() {
+void createDataFile_testTEMP() {
     fp = fopen("/fs/dataLog.txt", "a");// open file and prepare to write
     if (fp == NULL) {
         pc.printf("Failed to open the file.\n\r");
     }
-    fprintf(fp, "Time (s)\t red (mW/cm2)\t green (mW/cm2)\t blue (mW/cm2)\n\r");
+    fprintf(fp, "Time (s)\t outside (C)\t inside (C)\t On Panel (C)\n\r");
 }
 
-void writeData(float time, float temp, float uv, uint16_t red, uint16_t green, uint16_t blue)
+void writeData(uint16_t time, float temp, float uv, uint16_t red, uint16_t green, uint16_t blue)
 {
     fprintf(fp, "%.2f \t %.2f \t %.2f \t %d \t %d \t %d\n\r", time, temp, uv, red, green, blue);
 }
 
-void writeData_testRGB(float time, uint16_t red, uint16_t green, uint16_t blue) {
+void writeData_testTEMP(uint16_t time, float outside, float inside, float panel) {
     //output values for each
-    fprintf(fp, "%.2f \t %d \t %d \t %d\n\r", time, red, green, blue);
+    fprintf(fp, "%.2f \t %d \t %d \t %d\n\r", time, outside, inside, panel);
+}
+
+void closeDataFile() {
+    fclose(fp);
+    fs.unmount();
 }
 
 bool mountSDCard() {
@@ -37,7 +41,3 @@
     return mountFailure;
 }
 
-void closeDataFile() {
-    fclose(fp);
-    fs.unmount();
-}
\ No newline at end of file