OR Operator Doesn't Return Expected Output

I have a code where I am testing for fires. The buzzer is set off if at least one of the fire sensors is LOW (All sensors are set to active-high), based on the output from the OR logic gate. The problem is, the logic gate only outputs a LOW(0) if all sensors are 0. Nothing else. I am not sure why that is and how to fix it.
I am using an Arduino Mega for this.

int buzzer = 2;
int IRSensor1 = 5;
int IRSensor2 = 23;
int IRSensor3 = 24; 
int Fire;

void setup() {
    Serial.begin(57600);
    pinMode(buzzer, OUTPUT);
} 

int FlameSensor (int FireSensor){
  if (FireSensor == HIGH) {
    digitalWrite(buzzer, LOW);
    Serial.println("NO FIRE DETECTED");//Serial Monitor
  }
  else {
    digitalWrite(buzzer, HIGH);
    Serial.println("FIRE DETECTED");//Serial Monitor
  }  
}

void loop ( ) {
    int FireSensor1 = digitalRead(IRSensor1);
    int FireSensor2 = digitalRead(IRSensor2);
    int FireSensor3 = digitalRead(IRSensor3);

    Serial.print("FireSensor1: ");
    Serial.println(FireSensor1);
    Serial.print("FireSensor2: ");
    Serial.println(FireSensor2);
    Serial.print("FireSensor3: ");
    Serial.println(FireSensor3);
    Fire = FireSensor1 || FireSensor2 || FireSensor3; 
    Serial.print("Fire: ");
    Serial.println(Fire);

    FlameSensor (Fire);

delay(1500);
}

What are you using for a sensor? when flame is detected, does the sensor output a HIGH or LOW signal?

missing pinMode for all the inputs??

good luck.. ~q

Truth table of 3-input OR gate

(Source: Explain Logic OR Gate and Its operation with Truth Table - Electronics Post)

Then you need to use the AND operand.

Wow. So the answer is simple. I need an AND gate instead of an OR gate. I thought it was an OR gate all along, I was looking out for other potential reasons why I wasn't getting what I wanted. Thank you.

Yh. The Arduino pins are set to input by default. It is okay to set them to still if you want but it won't take anything away from the code.

I think the problem here that your inputs are inverted - a LOW input in TRUE.
But Arduino, C++, C, and most other programming languages want TRUE to be HIGH.
It would probably be most understandable if you inverted your conditions as you read them:

The AND works as explained by DeMorgan's First Theorem

First rule. Makes it easy to change, and everything else easier to read.

You can do that writing, also. Just fix the polarity or sense of the logic signal at the very last moment in your digitalWrite() statement.

a7