楼主,请问怎么用IC模式做一个脉冲计时器呢?我用timer.IC他一直在报错……
- import pyb
- from pyb import Pin
- timer1 = pyb.Timer(4)
- timer1.init(freq = 60)
- count = 0
- def counter():
- count += 1
- ch1 = timer1.channel(1,pyb.Timer.IC,pyb.Pin('Y1'),pyb.Timer.RISING)
- print(ch1)
报错显示:extra positional argument given