Help, temperature sensor, buzzer sound problem

i made code to compare my indoor and outdoor temperature values, when both the temperature values are same i would like to make a beep sound. Problem i face is, often the temperature values are same and i get annoying buzzer sound until the condition mismatch,
i would like to get a single beep when both temperature matches.
the "delay(1000);" used in the code delays my other functions(since the temperature values are changing so fast, i used delay().), i would like to replace delay() with some other which wont delay my other functions...

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
float temp1;
int tempPin1 = 0;
float temp2;
int tempPin2 = 1;
int Buzz = 22;

void setup()
{
  lcd.begin(16, 2);
  pinMode(Buzz, OUTPUT);
}

void loop()
{
//In Door  
  temp1 = (3.3 * analogRead(tempPin1) * 100.0) / 1024;
  lcd.setCursor(0, 1);
  lcd.print(temp1);
  lcd.setCursor(0, 0);
  lcd.print("In Door|");
  lcd.setCursor(5, 1);
  lcd.print("*C|");

//Out Door
  temp2 = (3.3 * analogRead(tempPin2) * 100.0) / 1024;
  lcd.setCursor(8, 1);
  lcd.print(temp2);
  lcd.setCursor(8, 0);
  lcd.print("Out Door");
  lcd.setCursor(13, 1);
  lcd.print("*C");
  
//Temp match
if(temp1 = temp2)
  {
    digitalWrite(Buzz, HIGH);
  }
  delay(1000);
}

thanks in advance..

if(temp1 = temp2)Fix this first. What it is doing at the moment is to set temp1 to temp2 and that will always return true.

Then think how often two calculated float values are going to equal one another. Comparisons do not work well with floats.

UKHeliBob:
if(temp1 = temp2)Fix this first. What it is doing at the moment is to set temp1 to temp2 and that will always return true.

Then think how often two calculated float values are going to equal one another. Comparisons do not work well with floats.

Comparisons for equality don't. But you have also overlooked a basic design aspect. How closely equal do you want the temperatures to be, to sound the alarm? Two sensors will even measure slightly differently, no matter how good or expensive they are. The more precision the measurement is made with, the less often they would be "equal". Surely that is not what you want. If you want to detect a difference of only half a degree, you would test like this:

if( abs(temp1 - temp2) < 0.5 )

When you determine that the temperatures match, and sound the alarm, set a flag. Next time the temperatures match, check the flag before sounding the alarm.

When the temperatures do not match, clear the flag.