2019-9-13 00:03:38 [显示全部楼层]
3062浏览
查看: 3062|回复: 1

[求助问答] microbit的定时器问题

[复制链接]
bxy 里面有一个necir库用来接收ir信号,非常好用。
例子代码是这样的:
import necirdef cb(addr,cmd):  print('addr=',hex(addr))  print('cmd=',hex(cmd))necir.init(16)  necir.read(cb)while True:  pass我发现necir[color=rgb(0, 0, 0) !important].[color=rgb(0, 0, 0) !important]read[color=rgb(0, 0, 0) !important]([color=rgb(0, 0, 0) !important]cb[color=rgb(0, 0, 0) !important])这里是把cb做为回调函数!请问在microbit这里是怎么实现的呢?[color=rgb(0, 0, 0) !important]我找了很久很久,都没发现microbit有定时器库,这里是怎么实现回调函数实现的呢?[color=rgb(0, 0, 0) !important]>>> machine.
__name__        unique_id       reset           freq
disable_irq     enable_irq      mem8            mem16
mem32           time_pulse_us

没有timer库呢?请问如何实现的呢?

gada888  版主

发表于 2019-10-16 20:59:30

这个程序看着头晕
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
关于楼主
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail