I'v looked at pyserial but I can't seem to figure out how to do it. I only need to send one at a time? Please help?
2 Answers
Using pySerial:
Python 2.x:
import serial
byte = 42
out = serial.Serial("/dev/ttyS0") # "COM1" on Windows
out.write(chr(byte))
Python 3.x:
import serial
byte = 42
out = serial.Serial("/dev/ttyS0") # "COM1" on Windows
out.write(bytes(byte))
Comments
Google says:
if you're using Uspp; to write on serial port documentation says