11 lines
182 B
Python
11 lines
182 B
Python
from machine import Pin, Timer
|
|
|
|
led = Pin("LED", Pin.OUT)
|
|
tim = Timer()
|
|
def tick(timer):
|
|
global led
|
|
led.toggle()
|
|
|
|
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)
|
|
|