📅  最后修改于: 2022-03-11 14:46:04.177000             🧑  作者: Mango
# https://pyserial.readthedocs.io/en/latest/pyserial_api.html
# pip install pyserial
import serial
if __name__ == "__main__":
with serial.Serial('COM10') as serial_port:
line = serial_port.readline()