This example program utilizes the MAX31856 mbed library available from Maxim Integrated at the following link: https://os.mbed.com/teams/Maxim-Integrated/code/MAX31856/

Dependencies:   MAX31856 mbed

Fork of MAX31856_example_program by Central Applications - Mbed Code repo

Revision:
2:296485923589
Parent:
1:b58719a76fc3
Child:
3:a99a4367c909
--- a/main.cpp	Wed Jul 26 17:03:59 2017 +0000
+++ b/main.cpp	Wed Jul 26 18:46:23 2017 +0000
@@ -1,5 +1,4 @@
 #include "mbed.h"
-#include "max32630fthr.h"
 #include "MAX31856.h"
 //#include "USBSerial.h"
 //#include "SDFileSystem.h"
@@ -7,6 +6,7 @@
 
 /*
 //----------------------------------------------------------
+#include "max32630fthr.h"
 //Define serial ports
 // Hardware serial port over DAPLink
 Serial daplink(P2_1, P2_0);
@@ -27,7 +27,6 @@
 
 
 
-
 //----------------------------------------------------------
 //Define serial ports
 // Hardware serial port over DAPLink
@@ -37,7 +36,7 @@
 //SPI testSPI(SPIO MOSI,SPIO MISO,SPIO SCK);
 SPI testSPI(P6_1, P6_2, P6_0);
 //----------------------------------------------------------
--------------
+//-------------
 //Thermocouples
 MAX31856 Thermocouple(testSPI, P6_3, CR1_TC_TYPE_K, CR0_FILTER_OUT_60Hz, CR1_AVG_TC_SAMPLES_1, CR0_CONV_MODE_NORMALLY_ON);
 
@@ -61,9 +60,9 @@
 //    spi.format(8,3);
     while (true) {
         led1 = !led1;
-        wait(1.0);
+        wait(0.2);
         temperature_TC=Thermocouple.readTC();
-        //temperature_CJ=Thermocouple.readCJ();
+        temperature_CJ=Thermocouple.readCJ();
         daplink.printf("MAX31856 TC = %f Celsius   MAX31856 CJ = %f Celsius  \n\r",temperature_TC,temperature_CJ);