diff --git a/testcode.py b/testcode.py index 28a95a1..a5a4050 100644 --- a/testcode.py +++ b/testcode.py @@ -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.")