Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import serial
- port = 'COM1'
- ser = serial.Serial()
- ser.port=port
- ser.baudrate=9600
- ser.open()
- ser.write(b'q')
- ser.close()
- Traceback (most recent call last):
- File "C:UsersMateuszDesktopserialpy.py", line 7, in <module>
- ser.open()
- File "C:Python37libsite-packagesserialserialwin32.py", line 62, in open
- raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
- serial.serialutil.SerialException: could not open port 'COM1': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement