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).
from pyb import Servo import time,pyb
s1 = Servo(1) # servo on position 1 (P7) led = pyb.LED(1)
while(1): led.on() s1.angle(45) # move to 45 degrees time.sleep(600) led.off() s1.angle(0) # move to -60 degrees in 1500ms time.sleep(600)
https://singtown.com/learn/50057/
https://singtown.com/learn/50541/
看一下视频。