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:
3:8ace1992bc93
Child:
6:61b76e7dc5b7
--- a/main.cpp	Sat Mar 12 01:42:13 2016 +0000
+++ b/main.cpp	Wed Mar 16 21:56:06 2016 +0000
@@ -1,10 +1,11 @@
   //Authors: Tom, Nathan, Jeriah 
 #include "mbed.h"
-#include "RGBSensor.h"
+#include "TEMPSensor.h"
 #include "SDFileSystem.h"
 #include "SDSave.h"
 
 
+
 Timer t;
 DigitalOut ledBlue(LED_BLUE);
 DigitalOut ledRed(LED_RED);
@@ -16,22 +17,19 @@
     ledRed = 0;
     ledBlue = 1;
     wait(0.5);
-    RGB_init();
     t.start();
     pc.printf("The timer has started\n\r");
     if (mountSDCard()) {
         return -1; //end program with error status
     }
     pc.printf("The SD card is mounted\n\r");
-    createDataFile_testRGB();
-    uint16_t rgb[3];
     ledRed = 1;
+    createDataFile_testTEMP();
     while (t.read()<60) {
         if (t.read()>(lastTime+interval))  {
           lastTime=t.read();
-          get_rgb(rgb);
-          pc.printf("t = %.2f \t red = %d \t green = %d\t blue = %d\r\n",lastTime,rgb[0],rgb[1]);
-          writeData_testRGB(lastTime,rgb[0],rgb[1],rgb[2]);//send data to writeData in SDsave.cpp
+          pc.printf("t = %.2f \t outside = %d \t inside = %d\t panel = %d\r\n",lastTime,get_outsideTemp(),get_insideTemp(),get_panelTemp());//prints titles and data of Temp readings
+          writeData_testTEMP(lastTime,get_outsideTemp(),get_insideTemp(),get_panelTemp());//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
         }
     }