UART and end of line
Posted: Fri Feb 12, 2021 7:50 pm
Hello,
I'm trying to read 40 bytes from uart.readline() in micropython. However the reading stops when it encounters \x00.
Example.
"\xff\xff\xff\xff\x01\x00\x05\x07\x02\x44\x45\x41\"
uart.readline() returns b'\xff\xff\xff\xff\x01'
Can someone shed a light into this? Why does it convert to ascii and How can I read the 0 byte and the rest?
I'm trying to read 40 bytes from uart.readline() in micropython. However the reading stops when it encounters \x00.
Example.
"\xff\xff\xff\xff\x01\x00\x05\x07\x02\x44\x45\x41\"
uart.readline() returns b'\xff\xff\xff\xff\x01'
Can someone shed a light into this? Why does it convert to ascii and How can I read the 0 byte and the rest?