1

When sending information via serial port using the pyserial import, the "write" function is sending the data coded as ASCII.

I would like a method to send the hex data as it is, meaning that for h"7" to send "00000111" for example and not the "00110111" ascii coded.

Could somebody help?

Alex28
  • 11
  • 1

1 Answers1

0

I would recommend casting the data you're writing to the serial buffer.

See this answer: Convert binary to ASCII and vice versa

addohm
  • 2,248
  • 3
  • 14
  • 40