I am totally new to python. I am using python 3.4.3 and I have been trying to transmit data to usb to a LED driving circuitry.I want to modulate data which is reaching to the usb port. I have a usb to serial converter installed in my system. can anyone suggest a programme code for the same. The programme i have tried is
import serial
ser=serial.Serial("/dev/ttyUSB0", 115200)
ser.open()
ser.isOpen()
print ('Enter your commands below.\r\nInsert "exit" to leave the application.')
I am having MS Windows 8.1 with 64 bit OS.
I have installed the serial module using pyserial-2.7.win32_py3k.exe downloaded from https://pypi.python.org/pypi/pyserial.The error message is
Traceback (most recent call last):
File "C:/Users/shamsu/Desktop/ss.py", line 10, in <module>
bytesize=serial.SEVENBITS
File "C:\Python34\lib\site-packages\serial\serialwin32.py", line 38, in __init__
SerialBase.__init__(self, *args, **kwargs)
File "C:\Python34\lib\site-packages\serial\serialutil.py", line 282, in __init__
self.open()
File "C:\Python34\lib\site-packages\serial\serialwin32.py", line 66, in open
raise SerialException("could not open port %r: %r" % (self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/dev/ttyUSB1': FileNotFoundError(2, 'The system cannot find the path specified.', None, 3)
Did i installed serial module for 32 bit? my system is using 64 bit windows 8.1 OS.
I don't know whether this programme is correct for my application. Can anyone help me?