# https://drive.google.com/file/d/1BofWWtL7qYXjh_t3pRlO7_p28K9EGO7V/view
from machine import PWM, Pin, ADC, SoftI2C, I2C
import time
buzzer=PWM(Pin(4));
pir1_pin = Pin(14, Pin.IN)
pir2_pin = Pin(2,Pin.IN)
led_pin = Pin (17, Pin.OUT)
def motion_handler(pin):
led_pin.on()
buzzer.freq(100000)
buzzer.duty_u16(2500)
time.sleep(1)
buzzer.duty_u16(0)
led_pin.off()
while True:
time.sleep(1)
pir1_pin.irq(trigger=Pin.IRQ_RISING, handler=motion_handler)
pir2_pin.irq(trigger=Pin.IRQ_RISING, handler=motion_handler)