https://www.adafruit.com/products/269 and https://www.adafruit.com/products/270
I have a Arduino Mega 2560 Rev 3 with the following code.
Code: Select all
/***************************************************
This is an example for the Adafruit Thermocouple Sensor w/MAX31855K
Designed specifically to work with the Adafruit Thermocouple Sensor
----> https://www.adafruit.com/products/269
These displays use SPI to communicate, 3 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include "Adafruit_MAX31855.h"
int thermoDO = 5;
int thermoCS = 6;
int thermoCLK = 7;
Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup() {
Serial.begin(9600);
pinMode(2, OUTPUT);
pinMode(3, INPUT);
pinMode(4, OUTPUT);
digitalWrite(2, HIGH);
digitalWrite(4, LOW);
Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
Serial.print("Internal Temp = ");
Serial.println(thermocouple.readInternal());
double c = thermocouple.readCelsius();
if (isnan(c)) {
Serial.println("Something wrong with thermocouple!");
} else {
Serial.print("C = ");
Serial.println(c);
Serial.print("F = ");
Serial.println(thermocouple.readFarenheit());
}
delay(1000);
}
This is what I get on the Serial Window.
Code: Select all
MAX31855 test
Internal Temp = 0.00
C = 0.00
F = 32.00
Internal Temp = 0.00
C = 0.00
F = 32.00
Internal Temp = 0.00
C = 0.00
F = 32.00
Internal Temp = 0.00
C = 0.00
F = 32.00
Internal Temp = 0.00
C = 0.00
F = 32.00
The strange thing is I get Internal Temp of 0.00 which tells me there is something strange going on regardless of the thermocoupler.