import time
from machine import Pin
time.sleep(0.1) # Wait for USB to become ready
PIR=Pin(2,Pin.IN)
Led=Pin(10,Pin.OUT)
Boton=Pin(28,Pin.OUT)
while True:
if Boton.value()==1:
PIR.on()
Led.on()
time.sleep(0.5)
Led.off()
time.sleep(0.5)