还是刚才的问题,为什么我拍照成功后,用32的板子的为openmv提供5v电源,结果就闪了一下白灯,按按键发送无法拍照?
-
我把32板子和openmv都连在电脑上,串口也连接了,按按键可以发送OK,复位后也可以拍照,但是用32来为openmv供电却无法拍照。
# 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.QVGA) # 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): if uart.any(): a = uart.readline().decode() print(a) if a == "OK\r\n": img = sensor.snapshot() img.morph(1, [+2, +1, +0,\ +1, +1, -1,\ +0, -1, -2]) # Emboss the image. img.save("example.jpg") # or "example.bmp" (or others) pyb.LED(BLUE_LED_PIN).off() print("Done! Reset the camera to see the saved image.")
想问一下为什么用32为openmv提供5v电源无法拍照并储存到SD卡,以及如何实现不复位按一下按键就拍一张照。
-
OpenMV的VIN引脚5v供电。
OpenMV 运行了脱机运行的步骤。
串口连线正确,是否有共地。
-
请说准确的现象,什么叫做无法拍照?