logo

openmv怎么复位,举个例子,和stm32通信显示一串0开始的数,但是每次都不是0开始(下面是这个例子的代码)

2021-07-31 20:07
X
h25a
import time
from pyb import UART

# 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, 115200)
a=0
while(True):
    a=a+11
    uart.write("%d\r\n"%a)
    time.sleep_ms(1000)
2021-08-01 11:21
I
网红小智智 星瞳科技

OpenMV有rst引脚,可以复位。

但是这个不是复位的问题,是通信同步的问题。

你可以在OpenMV上检测一个引脚的电平,如果是高电平就从0开始发送。

或者用串口检测数据输入,接受到开始指令后从0开始发送。