SPWF04 MicroPython Timers
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-06-23 3:59 AM
Posted on June 23, 2018 at 12:59
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
Labels:
- Labels:
-
TIM
0 REPLIES 0
