From 10ada0eac6ad07cbc92dc56e09ef201344fb196b Mon Sep 17 00:00:00 2001 From: Joachim Hummel Date: Sat, 2 Dec 2023 12:03:13 +0000 Subject: [PATCH] First Initial --- 2-dezember.py | 24 ++++++++++++++++++++++++ README.md | 0 2 files changed, 24 insertions(+) create mode 100644 2-dezember.py create mode 100644 README.md diff --git a/2-dezember.py b/2-dezember.py new file mode 100644 index 0000000..a275a8d --- /dev/null +++ b/2-dezember.py @@ -0,0 +1,24 @@ +from machine import Pin +import time +gruen = Pin(18, Pin.OUT) +gelb = Pin(19, Pin.OUT) +rot = Pin(20, Pin.OUT) + +# Anzahl der Iterationen für die Schleife +anzahl = 20 + +# Schleife mit Verzögerung von 5 Sekunden +for i in range(anzahl): + print(f"Schleifeniteration {i + 1}") + rot.value(1) + time.sleep(3) + rot.value(0) + gelb.value(1) + time.sleep(3) + gelb.value(0) + gruen.value(1) + time.sleep(5) + rot.value(0) + gelb.value(0) + gruen.value(0) + time.sleep(5) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29