Reputation: 1843
After experimenting with some Serial communication (which may or may not be relevant), the Arduino IDE throws a "Error opening serial port" error when I try to upload new code to the Arduino or use Serial Monitor. This has happened in both Windows and Linux.
In Linux, after a failed upload I tried disconnecting, then reconnecting the board. It was reassigned to the next open serial port. For example, it starts out as /dev/ttyACM0, then moves to /dev/ttyACM1, and so on.
When plugged in, the "TX" LED lights up, then goes dark. When I try to upload to it, the "TX" LED flickers twice, then nothing.
Any ideas?
Upvotes: 1
Views: 2605
Reputation: 615
Open the file ~/.arduino/preferences.txt file(linux). There you will find a string serial.debug_rate. Check its value. Typically its value is 9600(it denotes the baud rate of the serial communication). So if this value is something else, that might be causing the problem.
I have no definite answer for what might cause the value to change. But in my case changing it back to 9600 worked fine.
Upvotes: 2
Reputation: 187
Having something physically plugged into the serial port on the arduino will keep sketches from uploading.
Upvotes: 0