I'm trying to connect to my MultiWii over PySerial, however I keep getting this error.
Error communicating...unicode strings are not supported, please encode to bytes: '$M<\x00ll'
This is the part of the code that's failing:
BASIC="\x24\x4d\x3c\x00"
MSP_ATTITUDE=BASIC+"\x6C\x6C"
ser.write(MSP_ATTITUDE)
I've tried encoding the strings with .encode()
in which I get this error:
Error communicating...'bytes' object has no attribute 'encode'
I've tried bytearray(MSP_ATTITUDE,'ascii') and get the previous error.
I'm only asking this because this error circle doesn't really make sense. Can anyone help? I can provide more information regarding the code if it'll help.
Thanks in advance