UIFlow Guide
初始化引脚用于一般舵机控制(50Hz, 500-2500us), 实现角度控制。
from m5stack import *
from m5ui import *
from uiflow import *
from servo import Servo
import time
setScreenColor(0x222222)
servo0 = Servo(26,50,500,2500,180)
while True:
servo0.write_angle(0)
wait(1)
servo0.write_angle(180)
wait(1)
servo0.write_us(500)
wait(1)
servo0.write_us(2500)
wait(1)
wait_ms(2)
from servo import Servo
servo0 = Servo(26,50,500,2500,180)
servo0.write_angle(180)
servo0.write_us(2500)