Servo 舵机控制

预备知识

舵机

舵机类型与结构 (云台上两种不同的舵机) 原理 PWM 设定对应的偏转角度. 舵机与Cloudriver设计的拓展板的连接方式

Servo DOC

class Servo – 3-wire hobby servo driver

TODO 翻译文档 TODO 复杂一些的 servo demo TODO 演示视频

Servo Control Example

# Servo Control Example
#
# This example shows how to use your OpenMV Cam to control servos.

import time
from pyb import Servo

s1 = Servo(1) # P7
s2 = Servo(2) # P8

while(True):
    for i in range(1000):
        s1.pulse_width(1000 + i)
        s2.pulse_width(1999 - i)
        time.sleep(10)
    for i in range(1000):
        s1.pulse_width(1999 - i)
        s2.pulse_width(1000 + i)
        time.sleep(10)
Copyright 杭州云江科技有限公司 2017 all right reserved,powered by Gitbook该文件修订时间: 2018-04-02 09:53:12

results matching ""

    No results matching ""