def __init__(self):
self.ser = serial.Serial(
port='/dev/ttyAMA0', # number of device, numbering starts at
baudrate=9600, # baud rate
bytesize=serial.EIGHTBITS, # number of databits
parity=serial.PARITY_NONE, # enable parity checking
stopbits=serial.STOPBITS_ONE, # number of stopbits
timeout=2, # set a timeout value, None for waiting forever
xonxoff=0, # enable software flow control
rtscts=0, # enable RTS/CTS flow control
)
评论列表
文章目录