I need help for python script that set baud rate in raw. Because on my raspberry after use sudo stty -F /dev/ttyUSB0 2400 raw
and then reboot I lose baud rate and should execuse manually that command.
1 Answer
It would be helpful if you posted your existing Python code.
You could use the following:
import serial
port = '/dev/ttyUSB0'
baud = 2400
serialPort = serial.Serial(port, baudrate = baud, timeout = 0.5)