Code: Select all
def blink_led():
pyb.LED(1).toggle()
tim=pyb.Timer(4)
tim.init(freq=2)
tim.callback(blink_led)
I am getting:
PYB: sync filesystems
PYB: soft reboot
MicroPython v1.9.4-85-gdf9b7e8f on 2018-05-24; PYBv1.1 with STM32F405RG
Type "help()" for more information.
>>> uncaught exception in Timer(4) interrupt handler
TypeError:
why?