7P,IDE2.8.1
2
2g3s
@2g3s
0
声望
2
楼层
274
资料浏览
0
粉丝
0
关注
2g3s 发布的帖子
-
led扩展板灯光调节0-100无变化,一直显示常亮
import time from pyb import Pin, Timer # 50kHz pin6 timer2 channel1 light = Timer(2, freq=50000).channel(1, Timer.PWM, pin=Pin("P6")) light.pulse_width_percent(100) # 控制亮度 0~100 while (True): time.sleep_ms(1000)