question about "bool" varriables

Hello world,

i would like to make a mash heater wich is guided by an arduino (uno).

my qeustion is about the bool varriable:

in the following code, i wanted to increase the temperature, till it reaches a certain pont. From there on i would like to keep the temperature above said pont.

void TempRegelung(){

  if(Tempanstieg = true){
    if(TempZustand > 480){            //480= arbitrayry point picked from my thermoresistor 
      digitalWrite(LedPin,HIGH);      //my thermorestor sits at ~500 at room temp
    }else {                           //the value of it decreases if it gets warmer
      digitalWrite(LedPin,LOW);
      Tempanstieg = false;
      delay(500);                     //added to see if the loop moves on or got stuck here
    }
  }
  
  if(Tempanstieg = false){
    if(Temphalten = true){
      if(TempZustand > 470){
        digitalWrite(LedPin,HIGH);
      }else{
        digitalWrite(LedPin,LOW);
      }
    }
  }

There fore i thought i make a system with two bool variable. When the set temperature is reached, the first bool turns to = false and so the loop should move on to the next if() function where the next bool var. is included. But the function does not move on.

the complete code:

const byte LedPin = 4;          
const byte TempPin = A5;
int TempZustand;              //a varable for the temperatur



bool Temphalten = true;       
bool Tempanstieg = true;



void setup() {
  Serial.begin(9600);
 
  pinMode(LedPin,OUTPUT);
  pinMode(TempPin,INPUT);

}

void loop() {
  TempRead();
  TempRegelung();
}


void TempRegelung(){

  if(Tempanstieg = true){
    if(TempZustand > 480){            //480= arbitrayry point picked from my thermoresistor 
      digitalWrite(LedPin,HIGH);      //my thermorestor sits at ~500 at room temp
    }else {                           //the value of it decreases if it gets warmer
      digitalWrite(LedPin,LOW);
      Tempanstieg = false;
      delay(500);                     //added to see if the loop moves on or got stuck here
    }
  }
  
  if(Tempanstieg = false){
    if(Temphalten = true){
      if(TempZustand > 470){
        digitalWrite(LedPin,HIGH);
      }else{
        digitalWrite(LedPin,LOW);
      }
    }
  }
  
}


void TempRead(){                            //a function to see the temp. on the serial monitor
  TempZustand = analogRead(TempPin);
  Serial.print("TempFühler: ");
  Serial.println(TempZustand);
}

edit: i simply forgott in the if functions the second "=".
sorry to bother

= is assignment, == is comparison. See the reference for the if structure.

Beware of accidentally using the single equal sign (e.g. if (x = 10) ). The single equal sign is the assignment operator, and sets x to 10 (puts the value 10 into the variable x). Instead use the double equal sign (e.g. if (x == 10) ), which is the comparison operator, and tests whether x is equal to 10 or not. The latter statement is only true if x equals 10, but the former statement will always be true.

Comparison is == not =.