so i changed the max31855 cpp and h file, as suggested on github. still getting zero values, and no errors.
i tried adding the spi.begin(); but that didnt do anything as well.
i restarted the arduino and the teensyarduino bootloader just in case.
ill try soldering tomrrow another max31855 in place.
Code:
/***************************************************
#include <SPI.h>
#include "Adafruit_MAX31855.h"
#define MAXDO 39
#define MAXCLK 27
#define MAX31855_2 36
SPISettings settingsTFT(25000000, MSBFIRST, SPI_MODE3);
SPISettings SettingsThermocouple(1000000, MSBFIRST, SPI_MODE1);
// initialize the Thermocouple
Adafruit_MAX31855 thermocouple(MAXCLK, MAX31855_2, MAXDO);
void setup()
{
SPI1.setSCK(27);
SPI1.setMISO(39);
delay(100);
pinMode(36,OUTPUT);
digitalWrite(MAX31855_2,HIGH);
SPI1.begin();
Serial.begin(9600);
while (!Serial) delay(1); // wait for Serial on Leonardo/Zero, etc
Serial.println("MAX31855 test");
// wait for MAX chip to stabilize
delay(500);
Serial.print("Initializing sensor...");
if (!thermocouple.begin()) {
Serial.println("ERROR.");
while (1) delay(10);
}
Serial.println("DONE.");
}
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.readFahrenheit());
delay(1000);
}
}