shortest code for max6675 and something more

#include "max6675.h"

int DO = 4;
int CS = 5;
int CLK = 6;

MAX6675 tc (CLK, CS, DO);

void setup() {
Serial.begin(9600);
// use Arduino pins
}

void loop() {
// basic readout test, just print the current temp

Serial.print("C = ");
Serial.println(tc.readCelsius());

delay(1000);
}
If the sensor not working, there are 4 main reasons:

  • something wrong about coding
  • connecting not corect
  • max 6675 module failed fail
    -and arduino fail
    the fourth reason may detect by the way not seeing CLK signalat pin 6