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?
A:
Google says:
if you're using Uspp; to write on serial port documentation says
Tumbleweed
2010-10-21 05:52:36
+2
A:
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))
Frédéric Hamidi
2010-10-21 06:05:16