Cannot upload to my new Mega 2560 on my laptop running Windows 11 but can upload using a desktop using Windows 10, have the exact same IDE versions and both are connected directly to the USB ports (no hubs/dongles). The weird thing is that I can upload to my Uno just fine on my laptop.
Error Code:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\luiss\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM7
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: ser_open(): can't open device "\.\COM7": Access is denied.
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
I have made sure the correct ports are selected have restarted my laptop multiple times. I have yet to try on a different computer running Windows 11 but if my older Uno can run on Windows 11 without issue I don't see why the newer Mega R3 cannot.
Hi @destroyer1080. Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.
I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.
Update*
After restarting my computer multiple times, changing the upload settings multiple times, unplugging the Mega multiple times, forcibly removing my COM ports and manually changing it around to random ports MULTIPLE TIMES, it finally worked. The last thing I did was unplug the USB B port from the Arduino, plugged it in, and immediately upload which then seemed to work. Now I can upload whenever without issue.
However, upon further inspection, after it was fixed, I noticed that the device in Device Manager no longer says it's manufactured by Arduino, instead, it says Microsoft, another thing I noticed was that the latest driver before was from 2015, but now the latest driver says 2006, don't know if this is simply a placeholder or bug by Windows but whatever it did it worked.