from machine import Pin
from time import sleep
PIR = Pin(4,Pin.IN)
red_rgb = Pin(15,Pin.OUT)
blue_rgb = Pin(14,Pin.OUT)
buzzybuzzerbeebuzzinglookingbuzz = Pin(9,Pin.OUT)
while True:
if PIR.value() == 1:
print("Motion Detected")
red_rgb.on()
sleep(0.1)
red_rgb.off()
sleep(0.1)
blue_rgb.on()
sleep(0.1)
blue_rgb.off()
sleep(0.1)
buzzybuzzerbeebuzzinglookingbuzz.on()
sleep(0.1)
buzzybuzzerbeebuzzinglookingbuzz.off()
sleep(0.1)
buzzybuzzerbeebuzzinglookingbuzz.on()
sleep(0.1)
buzzybuzzerbeebuzzinglookingbuzz.off()
sleep(0.1)
buzzybuzzerbeebuzzinglookingbuzz.on()
else:
print("No Motion Detected")
sleep(0.5)