Openmv代码
# Untitled - By: lenovo - 周五 5月 3 2019
import sensor, image, time
from pyb import UART
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
uart = UART(3,19200)
uart.init(19200,bits=8,parity=None,stop=1)
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot()
print(clock.fps())
uart.write("hello world")
time.sleep(1000)Aduino代码
void setup() {
// put your setup code here, to run once:
Serial.begin(19200);
pinMode(0,INPUT);
pinMode(1,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print(Serial.read());
delay(1000);
}
求助,不知道为什么串口读出来不对。

OpenMV上发送的是字符串。Arduino上接收到的需要的是字符串。
解决办法:arduino上使用Serial.readString()函数替代Serial.read()函数
@kidswong999 在 [和Arduino串口通信不对,](/post/10810) 中说:
> Serial.readString()
void setup() {
// put your setup code here, to run once:
Serial.begin(19200);
pinMode(0,INPUT);
pinMode(1,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print(Serial.readString());
delay(1000);
}您好,更改之后发现串口没有任何显示,波特率没有问题,怎么破呢?非常感谢
板子是mega2560
@h3gn 回不回是要用软串口