MAX6675 ThermoCouple - If statement for Temprature control

Hi everyone I am back again struggling with code.

This is what I have came up with but its not working. I think its not picking up my int tempsens = thermocouple.readFahrenheit();

Would you all be kind enough to help point me into the correct direction?

My Goal is to set a temprature. If the temp is below that it turns on. Above that it turns off.

Thanks for any help in advance.

#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() {
  Serial.begin(9600);
  // use Arduino pins 
  pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
  pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
  
  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize
  delay(500);
}

void loop() {
  // basic readout test, just print the current temp
  
   Serial.print("C = "); 
   Serial.println(thermocouple.readCelsius());
   Serial.print("F = ");
   Serial.println(thermocouple.readFahrenheit());
    delay(1000);
   
 int tempsens = thermocouple.readFahrenheit();
     if (tempsens<= 180){ 
           digitalWrite (HeaterPos, HIGH);
           digitalWrite (HeaterNeg, HIGH);
     }else {
         digitalWrite (HeaterPos, LOW);
         digitalWrite (HeaterNeg, LOW);}
  

}

So what have you got attached to pins 10 and 11? I ask because you do not have them set to outputs.

   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);
}