wallah pardon sur le coran de l eglise c'est pas de ma faute
This commit is contained in:
15
composants/test/PIR.py
Normal file
15
composants/test/PIR.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import RPi.GPIO as GPIO
|
||||
import time as t
|
||||
|
||||
GPIO.setmode(GPIO.BOARD)
|
||||
|
||||
pir = 10
|
||||
GPIO.setup(pir, GPIO.IN)
|
||||
|
||||
print("Stabilisation...")
|
||||
t.sleep(10)
|
||||
print("Stabilisation terminée")
|
||||
|
||||
while True:
|
||||
print("PIR :", GPIO.input(pir))
|
||||
t.sleep(0.5)
|
||||
Reference in New Issue
Block a user