I have a RFID reader, hooked up to a Feather M0 express. I want to send that data as keyboard input.
The reader sends ASCII formatted data. When I print to serial, I get
I've tried using:b'\r\n-5500C147AA\r\n>'
Code: Select all
import board
import busio
import digitalio
uart = busio.UART(board.D1, board.D0, baudrate=9600)
while True:
data = uart.read()
if data is not None:
data_string = ''.join([chr(b) for b in data])
print(data_string, end="")
If I try to send that using layout.write(data_string) I get this error message:-5500C147AA
I've tried using 'replace' as well without success.ValueError: No keycode available for character '\r' (13/0x0d).
I just want to keep the tag as read, without escape codes or whitespace.