I know there has been a lot of discussion on this but I still have a question. I am trying to send hex values through pyserial to my device using pyserial
command="\x89\x45\x56"
ser.write(command)
However I keep getting an error saying string argument without encoding.
Does anyone know how to solve this?
packet = bytearray()
packet.append(0x41)
packet.append(0x42)
packet.append(0x43)
ser.write(packet)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With