From 542c81bc13823365f69c164e4cacb17f299b36c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adu=20Alex=20G=C3=B6llnitz?= Date: Mon, 9 Feb 2026 12:17:45 +0100 Subject: [PATCH] testcode.py aktualisiert --- testcode.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) 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.")