导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. d4ct
    D
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    d4ct

    @d4ct

    0
    声望
    1
    楼层
    294
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    d4ct 关注

    d4ct 发布的帖子

    • 电机直接连接p0-1-2-3,怎么控制速度?

      没用点击拓展板,直接连的主板,怎么能控制速度

      import pyb

      These pins will be the ones we control to drive the

      H-Bridge sides as we like.

      pinA = pyb.Pin('P3', pyb.Pin.OUT_PP, pyb.Pin.PULL_NONE)
      pinB = pyb.Pin('P2', pyb.Pin.OUT_PP, pyb.Pin.PULL_NONE)
      pinC = pyb.Pin('P1', pyb.Pin.OUT_PP, pyb.Pin.PULL_NONE)
      pinD = pyb.Pin('P0', pyb.Pin.OUT_PP, pyb.Pin.PULL_NONE)
      #tim = pyb.Timer(4, freq=1000)
      #pinABPower = tim.channel(1, pyb.Timer.PWM, pin=pyb.Pin("P7"), pulse_width_percent=100)
      #pinCDPower = tim.channel(2, pyb.Timer.PWM, pin=pyb.Pin("P8"), pulse_width_percent=100)
      #上面三行没有用
      while (True):

      pyb.delay(1000)
      pinA.value(0)#左侧倒滑
      pinB.value(0)#左侧正滑
      pinC.value(0)#右侧倒滑
      pinD.value(0)#右侧正滑
      发布在 OpenMV Cam
      D
      d4ct