Hi! I had a quick question about the write_tx(“”) function.
I need to write non-ascii characters through the UART, but when I try it with write_tx, it sends 2 bytes of data instead of 1 (all ascii characters just sent their single byte value, I was looking at the output of the tx pin using a logic analyzer).
I need it to just write the singular byte of data, because the syntax of what I am writing to requires 1 byte of address, then 1 byte of data, then 1 byte of address, and so on. I need it to write 0x02 as the address, then 0xAA as the data.
which would look like:
Currently however, when I do write_tx(“\xAA”) it sends 2 bytes, 0xC2 then 0xAA.
I tried to write it as a byte instead (b”\xAA”) but then I got the error “Object of type bytes is not JSON serializable”.
Is there any way I can get the tx pin to just output 0xAA(10101010) in 1 byte?