Sample program for the MAX31855. Prints out the temperature read to console.

Dependencies:   MAX31855 mbed

Revision:
1:6bed4f6f7b35
Parent:
0:c50a2801c243
--- a/main.cpp	Mon Oct 22 09:42:16 2012 +0000
+++ b/main.cpp	Tue Oct 23 10:55:17 2012 +0000
@@ -26,8 +26,18 @@
             //Get the reading
             fvalue = max1.read_temp();
             
-            printf("Temperature is: %f\n\r", fvalue);
-        }
+            if (fvalue > 2000){
+                if(fvalue==2001){
+                    printf("No TC");
+                }else if(fvalue==2002){
+                    printf("Short to Ground");
+                }else if(fvalue==2004){
+                    printf("Short to VCC");
+                }
+            }else{
+                printf("Temperature is: %f\n\r", fvalue);
+            }
+     }
         
         //Heartbeat signal (not necessary)
         myled = !myled;