This problem doesn't seen to be very common around the Arduino community.
Basically, what's happening is that as soon as I click the upload button, the Arduino IDE tells me that my Arduino board is not connected. What's strange though is that the python application ino is able to upload my code just fine, so my only guess is that there is something wrong with the IDE itself.
Here's a copy of the error message I am getting at the time of uploading the sketch:
Binary sketch size: 444 bytes (of a 32,256 byte maximum)processing.app.SerialException: Error opening serial port '/dev/ttyACM1'.at processing.app.Serial.<init>(Serial.java:178)at processing.app.Serial.<init>(Serial.java:77)at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)at processing.app.Sketch.upload(Sketch.java:1671)at processing.app.Sketch.exportApplet(Sketch.java:1627)at processing.app.Sketch.exportApplet(Sketch.java:1599)at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)at java.lang.Thread.run(Thread.java:744)Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameterat gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:213)at processing.app.Serial.<init>(Serial.java:163)... 9 moreprocessing.app.debug.RunnerException: Error opening serial port '/dev/ttyACM1'.at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:174)at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)at processing.app.Sketch.upload(Sketch.java:1671)at processing.app.Sketch.exportApplet(Sketch.java:1627)at processing.app.Sketch.exportApplet(Sketch.java:1599)at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)at java.lang.Thread.run(Thread.java:744)
I am expecting to hear a few questions regarding this issue, so I'll go ahead and answer all the questions I can think of.
Is this the first time you trying to connect to the Arduino from this computer?
No. In fact, I was able to upload the same source code just fine less than two hours ago.
Did you try a different USB cord?
Yes, I did.
Can you upload the source code from a different computer?
Yes, I can.
Have you tried removing and reinstalling the IDE?
Yes, I have.
Have you tried a different USB port?
Yes, I have.
What seems to be the problem here?
ls -l /dev/ttyACM*
list the exact device that is mentioned in the error message, and is this the exact device set in the Arduino IDE under Tools => Serial Port?/dev/ttyACM1
was the port to the board until it got disconnected. So in short, when I clickupload
, it starts uploading then stops half way through and prints out the error message mentioned in the question above. I know the IDE is what is disconnecting the board. What I want to know is why!