import time
from servo import Servos
from machine import I2C, Pin
i2c = I2C(sda=Pin('P5'), scl=Pin('P4'))
servo = Servos(i2c, address=0x40, freq=50, min_us=500, max_us=2500, degrees=180)
while True:
servo.position(0, 180)
time.sleep_ms(1000)
servo.position(0, 180)
time.sleep_ms(1000)
I
i4s5
@i4s5
0
声望
1
楼层
627
资料浏览
0
粉丝
0
关注
i4s5 发布的帖子
-
舵机驱动,运行代码显示I2C弃用,咋改。