from machine import Pin
from time import sleep_ms
SW_PIN = 5
sw_pin = Pin(SW_PIN, Pin.IN, Pin.PULL_UP)
while True:
if sw_pin.value() == 0:
print("Taster gedrückt")
sleep_ms(200) # Debounce
sleep_ms(10)from machine import Pin
from time import sleep_ms
SW_PIN = 5
sw_pin = Pin(SW_PIN, Pin.IN, Pin.PULL_UP)
while True:
if sw_pin.value() == 0:
print("Taster gedrückt")
sleep_ms(200) # Debounce
sleep_ms(10)