testcode.py aktualisiert

This commit is contained in:
Adu Alex Göllnitz 2026-02-09 12:17:45 +01:00
parent 5c42e26d41
commit 542c81bc13

View File

@ -1,14 +1,14 @@
from gpiozero import MotionSensor
from time import sleep
# Dein OUT-Kabel steckt an GPIO17
pir = MotionSensor(17)
print("PIR Sensor Test gestartet...")
print("Warte auf Bewegung...")
while True:
pir.wait_for_motion()
print("Bewegung erkannt!")
pir.wait_for_no_motion()
print("Keine Bewegung mehr.")
from gpiozero import MotionSensor
from time import sleep
# Das OUT-Kabel steckt an GPIO17
pir = MotionSensor(17)
print("PIR Sensor Test gestartet...")
print("Warte auf Bewegung...")
while True:
pir.wait_for_motion()
print("Bewegung erkannt!")
pir.wait_for_no_motion()
print("Keine Bewegung mehr.")