• 免费好用的星瞳AI云服务上线!简单标注,云端训练,支持OpenMV H7和OpenMV H7 Plus。可以替代edge impulse。 https://forum.singtown.com/topic/9519
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 向OPENMV供电时,代码储存在SD卡中为何灯无显示?



    • 下面两份代码,为何前者一供电,蓝灯就亮,而后者不行,我分别把代码都放入SD卡中测试了,难道不是一供电,OPENMV就运行SD卡中的代码么?还是别的问题?

      # UART Control
      #
      # This example shows how to use the serial port on your OpenMV Cam. Attach pin
      # P4 to the serial input of a serial LCD screen to see "Hello World!" printed
      # on the serial LCD display.
      
      import sensor, image, pyb
      from pyb import UART
      
      RED_LED_PIN = 1
      BLUE_LED_PIN = 3
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
      sensor.set_framesize(sensor.VGA) # or sensor.QQVGA (or others)
      
      
      pyb.LED(RED_LED_PIN).off()
      #pyb.LED(BLUE_LED_PIN).on()
      print("You're on camera!")
      
      # Always pass UART 3 for the UART number for your OpenMV Cam.
      # The second argument is the UART baud rate. For a more advanced UART control
      # example see the BLE-Shield driver.
      uart = UART(3, 9600, timeout_char=1000)
      
      while(True):
          pyb.LED(3).on()
          if uart.any():
              a = uart.readline().decode()
              print(a)
              if a == "OK\r\n":
                  sensor.snapshot().save("example1.jpg")
                  uart.write("F")
                  pyb.LED(BLUE_LED_PIN).off()
                  print("Done! Reset the camera to see the saved image.")
      
      # UART Control
      #
      # This example shows how to use the serial port on your OpenMV Cam. Attach pin
      # P4 to the serial input of a serial LCD screen to see "Hello World!" printed
      # on the serial LCD display.
      
      import sensor, image, pyb,time
      from pyb import UART
      
      RED_LED_PIN = 1
      BLUE_LED_PIN = 3
      
      # Always pass UART 3 for the UART number for your OpenMV Cam.
      # The second argument is the UART baud rate. For a more advanced UART control
      # example see the BLE-Shield driver.
      uart = UART(3, 9600, timeout_char=1000)
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
      sensor.set_framesize(sensor.VGA) # or sensor.QQVGA (or others)
      sensor.skip_frames(time = 500) # Let new settings take affect.
      
      pyb.LED(RED_LED_PIN).off()
      sensor.skip_frames(time = 500) # Give the user time to get ready.
      
      print("You're on camera!")
      
      count = 0
      
      while(True):
          pyb.LED(3).on()
          if uart.any():
              a = uart.readline().decode()
              if a == "OK":
                  count = count + 1
                  sensor.snapshot().save("%d.jpg"%(count)) # or "example.bmp" (or others)
                  print("Done! Reset the camera to see the saved image.")
                  uart.write("Finish")
                  print("Send Finish.")
                  time.sleep(100)
                  pyb.LED(BLUE_LED_PIN).off()
                  a = "\n";
      
          else:
              sensor.snapshot()
              time.sleep(100)