I have to send ZANE:1:00004:XX_X.X_XXXX_000XX:\\r\\nvia serial communication with python.
here is my code:
import serial
ser = serial.Seria
In order to read you need to open a listening port(with a timeout) first, for example:
ser = serial.Serial('/dev/cu.usbserial-A901HOQC', 19200, timeout=5)
x = ser.read() # read one byte
s = ser.read(10) # read up to ten bytes (timeout)
line = ser.readline() # read a '\n' terminated line
ser.close()
See more details here.