星瞳实验室APP,快速收到回复
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 为什么openmv会自己打印帧率?有时脱机也不运行里面程序?



    • import sensor, image, time,math
      import car
      from pid import PID
      from pyb import UART
      from pyb import LED
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # use RGB565.
      sensor.set_framesize(sensor.QVGA) # use QQVGA for speed.
      sensor.skip_frames(10) # Let new settings take affect.
      sensor.set_auto_whitebal(True) # turn this off.
      clock = time.clock() # Tracks FPS.
      
      uart = UART(3, 9600, timeout_char=1000)
      uart.init(9600, bits=8, parity=None, stop=1,timeout_char=1000)#串口通讯初始化设置
      
      while(True):
          clock.tick() # Track elapsed milliseconds between snapshots().  
          print("haha")
      


    • 38.46154
      38.46154
      38.46154
      38.09524
      38.16794
      37.97468
      38.04348
      37.91469
      37.97468
      37.87879
      37.93103
      37.97468
      38.0117
      37.94038
      37.97468
      37.91469
      37.94643
      37.89474
      37.92415
      37.87879
      37.90614
      37.93103
      37.9538
      37.97468
      37.99392
      37.9562
      37.97468
      37.94038
      37.95811
      37.92667
      37.94369
      37.95967
      37.97468
      37.94643
      37.96095
      37.93467
      37.94872
      37.92415
      37.93774
      37.95067
      37.96296
      37.97468
      37.98587
      37.96376
      37.97468
      37.9538
      37.96446
      37.94466
      37.95507
      37.96507
      37.94643
      37.9562
      37.96562
      37.948
      37.95721
      37.94038
      37.9494
      37.93329
      37.94212
      37.92667
      37.93533
      37.94369
      37.95181
      37.93717
      37.94513
      37.93103
      37.93884
      37.92527
      37.93293
      37.94038
      37.92735
      37.93467
      37.94179
      37.92927
      37.93627
      37.92415
      38.46154
      37.73585
      37.97468
      37.73585
      37.87879
      37.97468
      38.04348
      37.91469
      37.97468
      37.87879
      37.93103
      37.85489
      37.90087
      37.83784
      37.87879
      37.91469
      37.94643
      37.89474
      37.92415
      37.87879
      37.90614
      37.86575
      37.89127
      37.85489
      37.87879
      37.90087
      37.92135
      37.88904
      37.9085
      37.87879
      37.89731
      37.86982
      37.88749
      37.86192
      37.87879
      37.89474
      37.90984
      37.88634
      37.90087
      37.87879
      37.89279
      37.87196
      37.88546
      37.89836
      37.87879
      37.89127
      37.90323
      37.88477
      37.89637
      37.87879
      37.89005
      37.87327
      37.8842
      37.86816
      37.87879
      37.88904
      37.89894
      37.88374
      37.89339
      37.87879
      37.8882
      37.87416
      37.88334
      37.86982
      37.87879
      37.88749
      37.89593
      37.88301
      37.89127
      37.87879
      37.88687
      37.8748
      37.88272
      37.89043
      37.87879
      37.88634
      38.46154
      37.73585
      37.97468
      37.73585
      37.87879
      37.73585
      37.83784
      37.73585
      37.81512
      37.87879
      37.93103
      37.85489
      37.90087
      37.83784
      37.87879
      37.82506
      37.86192
      37.89474
      37.84861
      37.87879
      37.90614
      37.93103
      37.9538
      37.91469
      37.93627
      37.90087
      37.92135
      37.94038
      37.9085
      37.92667
      37.94369
      37.91469
      37.93103
      37.90413
      37.91983
      37.89474
      37.90984
      37.92415
      37.90087
      37.91469
      37.92784
      37.90614
      37.91887
      37.89836
      37.9107
      37.89127
      37.90323
      37.91469
      37.89637
      37.90751
      37.91822
      37.90087
      37.9113
      37.89474
      37.90489
      37.88904
      37.89894
      37.9085
      37.89339
      37.90272
      37.91175
      37.89731
      37.90614
      37.89224
      37.90087
      37.88749
      37.89593
      37.90413
      37.89127
      37.8993
      37.9071
      37.89474
      37.90239
      37.89043
      37.89793
      37.88634
      38.46154
      38.46154
      37.97468
      38.09524
      38.16794
      37.97468
      38.04348
      37.91469
      37.97468
      37.87879
      37.93103
      37.97468
      37.90087
      37.94038
      37.97468
      37.91469
      37.94643
      37.89474
      37.92415
      37.87879
      37.90614
      37.93103
      37.89127
      37.91469
      37.93627
      37.90087
      37.92135
      37.88904
      37.9085
      37.92667
      37.89731
      37.91469
      37.88749
      37.90413
      37.91983
      37.89474
      37.90984
      37.88634
      37.90087
      37.87879
      37.89279
      37.90614
      37.88546
      37.89836
      37.9107
      37.89127
      37.90323
      37.88477
      37.89637
      37.87879
      37.89005
      37.90087
      37.8842
      37.89474
      37.90489
      37.88904
      37.89894
      37.88374
      37.89339
      37.87879
      37.8882
      37.89731
      37.88334
      37.89224
      37.90087
      37.88749
      37.89593
      37.88301
      37.89127
      37.87879
      37.88687
      37.89474
      37.88272
      37.89043
      37.89793
      37.88634
      38.46154
      37.73585
      37.97468
      38.09524
      38.16794
      38.21656
      38.04348

      Traceback (most recent call last):
      File "", line 2, in
      File "car.py", line 14, in
      Exception: IDE interrupt
      MicroPython v1.9.4-4580-g7747c5b36 on 2019-09-27; OPENMV4 with STM32H743
      Type "help()" for more information.



    • 我运行这个代码就没有出错误。
      0_1573539704011_e628db56-b92b-4c8e-bc1f-4247ef222a7c-image.png