int tempSensorPin = A0;
int motionSensorPin = A1;
int ledPin = D18;
int buzzerPin = D13;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(tempSensorPin, INPUT);
pinMode(motionSensorPin, INPUT);
}
void loop() {
int tempValue = analogRead(tempSensorPin);
int motionValue = analogRead(motionSensorPin);
if (tempValue > 25 || motionValue > 500){
digitalWrite(ledPin, HIGH);
tone(buzzerPin, 1000);
delay(500);
}else {
digitalWrite(ledPin, LOW);
noTone(buzzerPin);
}
}