Avrdude ser_open(): can't open device "\\.\COM5" the system cannot find the file specified

I took a few weeks off from my Arduino Uno and recently got this error when trying to upload a new sketch. When I click on Tools, the Port button is greyed out. What I have tried so far:

-a different USB port
-I have restarted my Windows laptop.

Suggestions on where to start. I have screenshots, but I don’t see an image upload button (probably because I am a new user). I am also a noobie with Arduino.

Arduino Uno or Arduino Opta? You did post in the Opta category.

What does Windows device manager think of your board?

I apologize. It is Uno, but when I clicked on Official Hardware on the Category drop-down and it was the only choice that was available.

Device Manager did not even have Ports (COM & LPT) listed as a choice. So I added the Arduino back in under “Add Legacy Hardware” and it showed up under COM7. But when I go back in IDE, and move it to COM7, I get the same error, except it says COM7 instead of COM5

Topic moved to a more suitable category on the forum.

If Windows does not recognise it in device manager you have a problem :) It should be recognised.

  1. Which version of Windows?
  2. Not really relevant but which version of the IDE?
  3. What is the serial-to-usb converter on your board; it's the IC closest to the USB port.
  4. What was the last project that you were working on when it started failing?

Thanks for moving the topic.

Windows 11 Home 10.0.22631

IDE 2.3.6

Don’t know what you mean “serial to USB converter” and I don’t know what IC means? Sorry, I am a noob when it comes to computers and Arduino.

It was this project. It was working a few weeks ago when I did the last project. Then I typed up the code on this sketch and now I have this error.

An IC is an Integrated Circuit. In the below image it's the black square between the USB connector and the RX and TX LEDs.

Instead of the square IC you might have a rectangular one like below (image from a clone Nano).

So if you can post a photo like in the first image it could help.

What does it involve? Any chance that you have damaged it with incorrect connections?