I was trying to point out that if you do:
Code: Select all
uart.readinto(buf[3:6])
Code: Select all
uart.readinto(mv[3:6])
Code: Select all
uart.readinto(buf[3:6])
Code: Select all
uart.readinto(mv[3:6])
Timing/synchronizing to appears to be an issue that I am seeing. I am expecting reasonable synchronized writes and reads from the uart port in this caseIn my experience, trying to do multi-byte reads will inevitably screw up somewhere down the line because the timing won't be exactly what you expect.
Code: Select all
uart.write(bytearray(message))
if uart.any(): #YES, complete bytearray/continuous packet is available after about 5ms.
for i in range(0, 15):
response3[i]=uart.readchar()
I had the same issue.EasyRider wrote:I will try to simplify this to work with 2 pyboards to make it easier to evaluate.
Will let you know.
Regards
John
Code: Select all
uart.write(bytearray(message))
if uart.any():
response= uart.read(ulen)
Code: Select all
uart.write(bytearray(message))
pyb.delay(10)
if uart.any():
response= uart.read(ulen)