I'm trying to read data from GPS module (GY-GPSV3-NEO). As you probably know it communicates via UART.
So first I tied to simulate any UART communication and catch some words.
I found and modified this code:
Code: Select all
uos.dupterm(None, 1)
uart = UART(0, 115200)
ch = b""
while ch != b"quit":
if uart.any():
ch = uart.read()
uart.write(ch)
uos.dupterm(UART(0, 115200), 1)
hm..
I send "01234567890123456789"
And as answer I get the string without second five, so it is: "012346789012346789"
I've tried with
Code: Select all
uart.readinto(buf)
Code: Select all
ch = uart.readline()
Where do I fail? Where is the problem?