I'm new to Arduino and I'm having trouble to upload code to my board.
I got Arduino NANO from OttoDIY. I'm not sure if it's original or Chinese clone.
When I try to upload I get the following error message:
avrdude: ser_open(): can't open device "\\.\COM4": Access is denied.
I'm certain I address the correct COM port.
I've tried installing a different ch340 driver from OttoDIY site.
Make sure you have the correct port for your Nano selected from the Tools > Port menu.
Make sure no other program has that port open. Only one program at a time is allowed to have a port open.
If none of that helps, try restarting your computer. Sometimes something glitches out and a port will get stuck open.
Hello and Welcome,
At the begining, I had also a lots of trouble about the arduino IDE for compiling and uploading my sketchs.
And i found, my anti-virus program blocked everything, with self made program code.
But i dont remember my failure messages.
Maybe your virus program block out your port access.
A funny thing:
When I write any program it is not possible to compile it, with my virus program
Arduino IDE, Microsoft visual studio, BASCOM.
But when I write Microsoft Excel/Access VBA,
where i open other programs and send automatic mails or something like this, it works fine.
Maybe you can check your anti-virus program,
maybe try to deactivate the real time / live time check.
Is there a way to know if any other program is getting the COM port before Arduino. I don't use any software I suspect of doing this (except Win10 and MS built-in anti virus).
I use the ZIP version of Arduino (no installation), Maybe I should try to install it properly.
Do you know if there is a difference between installing from MS app store or the Arduino site?
Maybe you can try, a COM port analyzer, Google it.
But i have no experience with that.
I think also it is better to install the Arduino IDE from the Arduino site.