Hello,
We are switching from the H7 to the RT1062 camera module, but our UART does not work between our openMV and our teensy. On the H7 this worked without problems, we are wondering if there is something different on the RT1062.
This is the old code on the H7
import sensor, image, time, math,struct, pyb
from pyb import UART
uart = UART(3, 115200, timeout_char=100)
uart.init(115200, bits=8, parity= 512, stop=1, timeout_char=10)
uart.write('3')
For RT1062 we switched to
import sensor, image, time, machine
from machine import UART
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
uart = UART(1, 115200, timeout_char=100) #(only UART 1 or 3 available,baud rate,delay b/w frames)
uart.init(115200, bits=8, parity= 512, stop=1, timeout_char=10)
uart.write("3")
while(True):
clock.tick()
img = sensor.snapshot()
print(clock.fps())
We only want to send simple bytes nothing much. Right now the teensy doesn’t read it (we get a -1)
The teensy code:
void setup() {
// put your setup code here, to run once:
Serial7.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
int rotation = Serial7.read();
Serial.println(rotation);
}
Does anyone have an idea what can cause this?