Write_tx with non-ascii characters

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:
write_tx(“\x02”)
write_tx(“\xAA”)

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?

Hi and welcome to the forum,

Today, we do not support non-ascii characters, sorry for this.

Best regards,
Björn

Hi, thank you for letting me know! would the best approach in this situation then be to try to connect to the UART another way(through a com/serial port or something)? And if so, do you have any advice about the best way to do so?

You are welcome.

Yes, best approach, with current implementation, is to connect via external UART, not via the UART on Arc/Ace if you need to send non-ascii data.

Best regards,
Björn