I have a function:
def push(push):
ser.write(push + '\r')
pull = ser.read(11)
return pull
and i call it like this:
out = push("ka " + dp_id + " ff")
It turns out to work very well with python2 but when I use python 3 I get the Error:
unicode strings are not supported, please encode to bytes: 'ka 01 ff\r'
Now if I do this:
out = push(b"ka " + display_id + " ff")
I get the Error:
can't concat bytes to str
Im confused. What does help?