PySerial [Error 5] Access is Denied

前端 未结 5 2021
不思量自难忘°
不思量自难忘° 2021-01-05 08:40

I am trying to write a program in Python that will loop to keep checking the serial port (COM4) and print out a message when the character \"1\" is read from the serial port

5条回答
  •  没有蜡笔的小新
    2021-01-05 08:51

    UPDATE: This is apparently no longer possible in PySerial 3.0.

    Under Windows, I've always used the port= approach with success.

    I.e. change your code to:

    c = serial.Serial(3, 9600)
    

提交回复
热议问题