-
繁花如伊
parity:serial.PARITY_NONEserial.PARITY_EVENserial.PARITY_ODDstopbits:serial.STOPBITS_ONEserial.STOPBITS_TWObytesize:serial.FIVEBITSserial.SIXBITSserial.SEVENBITSserial.EIGHTBITS
-
慕斯王
代码示例:import pyserialt=serial.Serial()t.port = 3t.baudrate = 115200t.open()t.write(chr(0x03)) #向串口输入ctrl+c
-
慕村9548890
ctrl+C得Ascii码-->316进制-->0X03所以你用pyserial写个0x03就行了,就相当于发了个ctrl+c