Daniel Blomdahl / Mbed 2 deprecated multiple_variable_temp

Dependencies:   MAX31855 SDFileSystem mbed

Revision:
2:a2966bf82e8c
Parent:
1:8116bd9d3c46
Child:
3:9339e7b93415
--- a/main.cpp	Tue Mar 08 16:44:14 2016 +0000
+++ b/main.cpp	Thu Mar 10 18:00:36 2016 +0000
@@ -1,11 +1,12 @@
+
 #include "mbed.h"
+#include "MAX31855.h"
 
-DigitalOut myled(LED1);
-SPI spi(p13,NC,p15);
-//MAX31855 temperature(spi,0x90);  // i2c, address
-/* The MAX31855 board has an address of 0x90 if ADD0 is connected to ground */
-MAX31855 thermometer1(spi,p15);
-MAX31855 thermometer2(spi,p16);
+Serial pc(USBTX,USBRX);
+SPI spi(NC,PTD3,PTD1);
+
+MAX31855 thermometer1(spi,PTC4);
+MAX31855 thermometer2(spi,PTC3);
 Timer t;
 
 int main()
@@ -16,11 +17,12 @@
    t.start();
    
    while (1) {
-       if t.read()>lastTime+dt) {
-           lastTime = t.read()l
+       if (t.read()>lastTime+dt) {
+           lastTime = t.read();
            temp1 = thermometer1.read();
            temp2 = thermometer2.read();
-           writeData(lastTime, temp1, temp2);
-
-   }
+           wait(.5);
+           pc.printf("%1.3f \n\r", temp1);
+        }
+    }
 }
\ No newline at end of file