I write to my device in hexadecimal format using pyserial:
ser.write("\x01\x03\x00\x00\x00\x0A\xC5\xCD")
data = ser.readline()
print data
The output is:
Q,f� ��
Q.f� �
Q8f� �B
Q5f� �
My problem is how to show the output in hex format, for instance
01 03 14 50 AD 00 00 00 00 00 00 00 00 00 00 66 DC 00 00 00 09 00 00 A8 42
Also, how can I convert to decimal:
50AD = 20653
66DC = 26332
I guess you have two problems: