2018-06-23 03:59 AM
I am trying to implement/run Timer on SPWF04S. I loaded script (to RAM 2) from example:
import pyb a=pyb.Timer(2) a.init(freq=20) led=pyb.LED(2) def toggle(l): l.toggle() a.callback(lambda t:toggle(led))I ran it (AT+S.PYTHON=timer.py) and.... all LEDs went out and next after 20 seconds the Wachdog reset the module.
I have no idea, what I am doing wrong.And what does the parameter: 'lambda t:' mean?#spwf04sc #micropython #timer