First Initial
This commit is contained in:
commit
10ada0eac6
24
2-dezember.py
Normal file
24
2-dezember.py
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user