I'm using an Arduino Uno board with an HP computer running Windows 10. Arduino was working fine for me until a few days ago, when (and I suspect this is the root of the problem) I accidentally tried to upload software with something connected to the RX and TX pins on the board. Now I continually get the error message below:
avrdude: ser_open(): can't open device "\.\COM2": Access is denied.
The only other thing that changed is I disconnected a bluetooth dongle (Kinivo BTD-400 Bluetooth 4.0 USB Adapter for Windows) without uninstalling any software, so I suspect that software may be searching for open COM ports and disrupting the Arduino upload.
I've tried everything I could find about troubleshooting online, and nothing has worked or even changed the problem - please help! I believe I've narrowed down the problem to my computer scanning open COM ports, but I can't find any reliable way to make sure that doesn't happen.
Are you sure that COM2 is the port the Arduino is using? You can test this by checking Tools > Port with the Arduino unplugged COM2 should not appear and then after plugging it in it should appear.
Pretty sure; the port does disappear when I unplug it, and I've tried manually changing the port number in Device Manager and that changes the number displayed by Arduino.
samwalbert:
the port does disappear when I unplug it, and I've tried manually changing the port number in Device Manager and that changes the number displayed by Arduino.
Yes, I think you have the right port
samwalbert:
Running Arduino 1.6.8 for the IDE.
There is a bug with 1.6.8 that causes this error on Windows. If that's the cause of your problem then using Arduino IDE 1.6.7 should solve it. That bug has been fixed in the hourly build http://www.arduino.cc/en/Main/Software#hourly if you want to test it to help with the development of the IDE please report your results and I'll pass them on to the developers. Let me know how it goes. Per