Arduino Nano - Sketch compiling but won't upload

All I'm getting is this error message:

Sketch uses 26182 bytes (85%) of program storage space. Maximum is 30720 bytes.
Global variables use 1605 bytes (78%) of dynamic memory, leaving 443 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

avrdude: ser_open(): can't set com-state for "\\.\COM4"
An error occurred while uploading the sketch

All I have is arduino IDE running, visuino isn't even connected to the board. Doesn't seem to want to upload, and not sure why. Is it a problem if I'm trying to upload with a display and a sensor connected to it? It's a pretty simple sketch, so I can't see why it's having issues like that.

Com 4 port is selected in arduino IDE, Nano board is selected with 328p processor selected, using AVR ISP MkII

Any insight or advice is greatly appreciated. I know a little bit about arduino because I work with 3D printers, this is my first personal DIY project I'm doing. It's super basic, just a DHT22 temp/humidity sensor and an I2C display. I could be doing something wrong but I can't see what it would be. Thanks for any help you may be able to offer.

That problem has nothing to do with your program. For some reason the IDE and avrdude are having trouble opening the COM4.

Try closing and re-opening the Arduino IDE and/or disconnecting and re-connecting your Nano.

Have you ever been able to upload any program to that Nano?

...R

visuino isn't even connected to the board.

What the hell is visuino? Why would you nail it to a board?

What is the art of getting polite answers? Does it make you feel powerful to bully learners or those not as clever as yourself?

2 Likes

There is an incompatibility between the bootloader on old revs of Nano/clones and the IDE since 1.8.5. After choosing your board, next to processor you probably see ATmega328P which you know to be correct so you ignore it, but clicking on it you will see ATmega328P (Old Bootloader) which you should select.

2 Likes

And now I notice OperatorJ has just wasted my time responding to a year-old post. People wonder why we are short at times.

Well I just now looked and it helped me, so thanks!