I'm using python to send data out to my arduino and for some reason under windows it's giving me an error. Below is my code.
import serial
ser = serial.Serial("COM3")
ser.write('1')
Here is the error.
File "C:\Python25\lib\site-packages\serial\serialwin32.py",line 255, in write raise SerialException("WriteFile failed (%s)" % ctypes.WinError()) serial.serialutil.SerialException: WriteFile failed ([Error 9] The handle is invalid.)
Any idea why it's giving me this?