helloworld.py

This commit is contained in:
root
2023-06-10 19:55:47 +02:00
commit c9591b9b80

18
helloworld.py Normal file
View File

@@ -0,0 +1,18 @@
from machine import Pin
from utime import sleep
led = Pin('LED', Pin.OUT)
state = False
def toggle_LED(state):
if state:
led.on()
else:
led.off()
while True:
state = not state
toggle_LED(state)
sleep(0.5)