You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
378 B

from machine import Pin
from utime import sleep
led = Pin(35, Pin.OUT)
state = False
LED_PIN =
# Setzt den Zustand der LED und wartet dann <wait> Sekunden.
def toggle_LED(state,wait):
if state:
led.on()
else:
led.off()
sleep(wait)
#Endlosschleife
while True:
state = not state # state hin- und herschalten
toggle_LED(state,0.5) # LED umschalten