Daniel Blomdahl / Mbed 2 deprecated multiple_variable_temp

Dependencies:   MAX31855 SDFileSystem mbed

Revision:
6:76e8649a643f
Parent:
3:9339e7b93415
Child:
7:9032b52be810
--- a/main.cpp	Thu Mar 17 14:46:33 2016 +0000
+++ b/main.cpp	Thu Mar 17 17:23:51 2016 +0000
@@ -1,13 +1,15 @@
 
 #include "mbed.h"
 #include "MAX31855.h"
-#include "
+#include "SDSaveFunction.h"
+#include "readingData.h"
 
 Serial pc(USBTX,USBRX);
 SPI spi(NC,PTD3,PTD1);
 
 MAX31855 thermometer1(spi,PTC4);
 MAX31855 thermometer2(spi,PTC3);
+// solarpanel1(spi, whateverThePortIsForThis)
 Timer t;
 
 int main()
@@ -16,14 +18,27 @@
    float lastTime = 0;
    float dt = 0.5;
    t.start();
-   
+   mountSDCard();
+   openDataFile();
+   while (halfHour<=6) {
+       if (t.read()>=30*60){
+           int halfHour++;
+           t.reset();
+           measureTemp(temp1);
+           measureVoltage
+           }
+   writeData((30*60*halfHour)+t.real(), temp1, voltage)
+   }
+   closeDataFile();
    while (1) {
        if (t.read()>lastTime+dt) {
            lastTime = t.read();
            temp1 = thermometer1.read();
            temp2 = thermometer2.read();
+           volt = voltage.read(); // I will need to put the voltage reading in here.
            wait(.5);
            pc.printf("%1.3f \n\r", temp1);
+    
         }
     }
 }
\ No newline at end of file