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.
20 lines
317 B
20 lines
317 B
from machine import Pin
|
|
from utime import sleep
|
|
|
|
led = Pin("LED", Pin.OUT)
|
|
state = False
|
|
running = True
|
|
|
|
#Endlosschleife
|
|
|
|
led.off()
|
|
while True:
|
|
state = not state # state hin- und herschalten
|
|
sleep(1.0)
|
|
if state:
|
|
print('LED on')
|
|
led.on()
|
|
# running = False
|
|
else:
|
|
print('LED off')
|
|
led.off()
|