logo

光源扩展板代码不能改成P0口作为定时器口吗

2021-03-22 14:50
8
m13t
import time
from pyb import Pin, Timer

# 50kHz pin6 timer2 channel1
light = Timer(1, freq=50000).channel(3, Timer.PWM, pin=Pin("P0"))
light.pulse_width_percent(10) # 控制亮度 0~100

while (True):
    time.sleep_ms(1000)
2021-03-23 15:46
I
网红小智智 星瞳科技

在硬件上,光源扩展板就是P6控制的。

https://singtown.com/product/50776/openmv-light-shield/

2021-03-25 13:35
8
m13t

不能用其他引脚吗

2021-03-25 15:07
I
网红小智智 星瞳科技

硬件上没法改啊,插上就肯定用这个引脚。