from machine import Pin
import time
# GPIO15 als Eingang, Pull-up aktiviert
taster = Pin(15, Pin.IN, Pin.PULL_UP)
while True:
if taster.value() == 0:
print("Taster gedrückt")
else:
print("Taster offen")
time.sleep(0.2)from machine import Pin
import time
# GPIO15 als Eingang, Pull-up aktiviert
taster = Pin(15, Pin.IN, Pin.PULL_UP)
while True:
if taster.value() == 0:
print("Taster gedrückt")
else:
print("Taster offen")
time.sleep(0.2)