unable to get readings from MAX31855

Hello all,

I am having an issue interfacing my Arduino nano with a MAX31855 module

My project is a modified version of the barebones coffee controller project by Tim Hirzel.

the exact problem seems to be that the 31855 is outputting zero for both the thermocouple and internal temperature (I’m currently sitting here in a t-shirt so i’m fairly certain thats not my current temp).

I had managed to get it outputting a reasonable temp yesterday with the example script in the adafruit MAX31855 library, however now when I try and run the same script as before I get the output as zero again.

I am aware that this problem has come up a lot before on this forum, but I’ve spent all morning trawling through the posts and have yet to find a solution.

I have attached a zip file containing my code and a txt file with my pinout.

If anyone has solved this problem before (even if it means buying a different module that works better) please help

temp_controller.zip (6.53 KB)

Post your code in code tags please, zip files are unlikely to get any takers, make it easy for people to peruse
your problem, not a pain...

Apologies, first time poster here.

the functions in this code are called from a primary sketch (in original zip)

#include <SPI.h>
#include <Adafruit_MAX31855.h>

// Example creating a thermocouple instance with software SPI on any three
// digital IO pins.
#define MAXDO   3
#define MAXCS   4
#define MAXCLK  5

float avtemp;
float error=0;

// Initialize the Thermocouple
Adafruit_MAX31855 thermocouple(MAXCLK, MAXCS, MAXDO);

float initMax() {
  int i, cd;
  double tmp = 0.0;
  for (i=0;i<5;i++) {
   
     tmp += thermocouple.readCelsius();        // Read the temp 5 times and return the average value
     delay(500);
  }
  avtemp = tmp/5.0;
  return avtemp;
}

float updateMax() {
  int i, cd;
  double tmp = 0.0;
  for (i=0;i<5;i++) {
   
     tmp += thermocouple.readCelsius();        // Read the temp 5 times and return the average value
     //delay(80);
  }
  if (isnan(tmp)){
    error = 1;
    errormessage(error);
  }else{
  avtemp = tmp/5.0;
  return avtemp;
  }
}

float internMax() {
  int i, cd;
  double intern;
  intern = thermocouple.readInternal();
  return intern;
}