#define flame 2
#define relay 3
#define buzzer 4
void setup() {
Serial.begin(9600);
pinMode(flame, INPUT);
pinMode(relay, OUTPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(relay, HIGH);
}
void loop() {
bool Svalue = digitalRead(flame);
if (Svalue == 0) {
digitalWrite(relay, LOW);
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
delay(300);
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
delay(300);
digitalWrite(buzzer, HIGH);
delay(300);
digitalWrite(buzzer, LOW);
} else {
digitalWrite(relay, HIGH);
}
}