ajout de composants

This commit is contained in:
2026-03-23 18:31:14 +01:00
parent ccfeb6f2c1
commit e48232b992
5 changed files with 63 additions and 0 deletions

12
composants/pir.py Normal file
View File

@@ -0,0 +1,12 @@
from machine import Pin
pir_sensor = Pin(33, Pin.IN)
def pir_detection():
while True:
if pir_sensor.value() == 1:
led_bleue.on()
utime.sleep(3)
led_bleue.off()
utime.sleep(0.1)