commit c9591b9b8017bccde41e009ec4cfeba878fe1a61 Author: root Date: Sat Jun 10 19:55:47 2023 +0200 helloworld.py diff --git a/helloworld.py b/helloworld.py new file mode 100644 index 0000000..4ffffca --- /dev/null +++ b/helloworld.py @@ -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) + \ No newline at end of file