8 lines
183 B
Python
8 lines
183 B
Python
from machine import Pin, Timer
|
|
led = machine.Pin("LED", machine.Pin.OUT)
|
|
timer = Timer()
|
|
|
|
def blink(timer):
|
|
led.toggle()
|
|
|
|
timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink) |