Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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)
在硬件上,光源扩展板就是P6控制的。
https://singtown.com/product/50776/openmv-light-shield/
不能用其他引脚吗
硬件上没法改啊,插上就肯定用这个引脚。