导航

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

    a4h1 创建的帖子

    • 有关于定时器的问题?
      OpenMV Cam • • a4h1

      2
      0
      赞同
      2
      楼层
      1462
      浏览

      # Timer Control Example # # This example shows how to use a timer for callbacks. import time from pyb import Pin, Timer # we will receive the timer object when being called # Note: functions that allocate memory are Not allowed in callbacks cnt = 0 def tick(timer): global cnt; cnt +=1 tim = Timer(2, freq=1) # create a timer object using timer 2 - trigger at 1Hz tim.callback(tick) # set the callback to our tick function while (True): time.sleep(2000) print(cnt)
    • 关于追小球的云台例程的问题
      OpenMV Cam • • a4h1

      4
      0
      赞同
      4
      楼层
      3356
      浏览

      @kidswong999 多谢,问题已解决,前面加sensor.set_hmirror(True)和sensor.set_vflip(True),然后 将 pan_error 和 tilt_error 算出来的值加个负号就行了