Serial.println(thermocouple.readFahrenheit());
delay(1000);
int tempsens = thermocouple.readFahrenheit();
Read and print something. Don't tell us what that is. Wait 1 second, and read and use something. Don't print it so you know what it is. I'm sensing two problem patterns here.
do not know how much the MAX6675 draws but it is not advised to use the standard pins to provide GND and 5V
better connect those two directly to GND and 5V pin.
some edits
#include "max6675.h"
int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;
int HeaterPos = 10;
int HeaterNeg = 11;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 3;
int gndPin = 2;
void setup()
{
// use Arduino pins
pinMode(vccPin, OUTPUT);
digitalWrite(vccPin, HIGH);
pinMode(gndPin, OUTPUT);
digitalWrite(gndPin, LOW);
pinMode(HeaterPos, OUTPUT);
digitalWrite(HeaterPos, LOW);
pinMode(HeaterNeg, OUTPUT);
digitalWrite(HeaterNeg, LOW);
Serial.begin(9600);
Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop()
{
// basic readout test, just print the current temp
int tempsens = thermocouple.readFahrenheit();
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println( tempsens );
if (tempsens <= 180)
{
digitalWrite (HeaterPos, HIGH);
digitalWrite (HeaterNeg, HIGH);
}
else
{
digitalWrite (HeaterPos, LOW);
digitalWrite (HeaterNeg, LOW);
}
delay(1000);
}