to be clear, I am changing the board in the tools menu.
when I upload code to my Arduino uno it works perfectly (using port 9), but I need a smaller board for my project.
I bought some Arduino nanos but when I try to upload to them I get the
avrdude: ser_open(): can't open device "\.\COM9": The system cannot find the file
specified.
error message. I tried closing all my other programs and rebooting my laptop but it didn't fix anything. It also seems to me the port can't be occupied since my Uno works fine. I figured the boards (they were cheap) were broken and bought some esp32 wrooms
Those throw a similar error:
A fatal error occurred: Could not open COM9, the port is busy or doesn't exist.
(could not open port 'COM9': FileNotFoundError(2, 'The system cannot find the file
specified.', None, 2))
Hint: Check if the port is correct and ESP connected
the selected serial port
does not exist or your board is not connected
I figure it can't be a problem with the boards, but I don't know what else it could be.