Regarding problem with my arduino nano

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  Serial.begin(9600);
}

// the loop function runs over and over again forever
void loop() {                    // wait for a second
Serial.write("hello");
delay(2000);
}

when I compile and upload a code to the nano it's showing this:

Sketch uses 1608 bytes (5%) of program storage space. Maximum is 30720 bytes.
Global variables use 190 bytes (9%) of dynamic memory, leaving 1858 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM9": The system cannot find the file specified.

Failed uploading: uploading error: exit status 1

You started a topic in the Uncategorised category of the forum

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

Is this the first time you've compiled and uploaded, or have you been successful, and this is a new problem?

  • Does your computer' Device Manager show a change when you plug/unplug the Arduino?
  • do you hear a 'chime' or other sound when you do that?

Hello Jayakrishnamarni

Welcome to the forum.

I am no expert in this matter. But I suggest, that you do this:

  1. Disconnect the USB connection to the nano.
  2. Restart PC.
  3. Open Arduino IDE.
  4. Look down right corner of window. If should say COMx [not connected] x is a number.
  5. Now try to connect your nano. If the status in corner do not change then disconnect again
  6. Look Tools - Port - select another possible USB port. Then try to connect again.

It can also be Tools - Processer - you need to select another processer like with old bootloader.

You could try Serial.println("hello"); instead of Serial.write("hello");

Yes I hear a usb plugin sound
I have 2 USB port on my laptop and one is showing COM8 and other COM9.

IDE >> TOOLS >> BOARD >> AVR BOARDS >> NANO.
IDE >> TOOLS >> PORT >> your port
if it fails again...
IDE >> TOOLS >> PROCESSOR >> old boot

I have done all this and in Arduino IDE it is showing "not connected" when i disconnect the nano.

That is expected.

Global variables use 190 bytes (9%) of dynamic memory, leaving 1858 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0
Failed uploading: uploading error: exit status 1

when i do this again

If your serial monitor is open, close it before starting the upload. There is a known issue regarding this with IDE 2.x.

Does that mean that when you disconnect the board you have none and when you connect the board you get two ports at the same time? That would indicate a Windows issue.

You will find these utilites useful in resolving USB problems

No when I insert in the right USB port its COM8, and on left COM9

Were you trying to burn a bootloader to an ATmega328p? ATtiny85


I think it is time to call... @ptillisch

ptillisch

Hi @jayakrishnamarni. You described the Arduino board you are uploading to as "Nano". Something that can be confusing is there are multiple boards with "Nano" in their name. We need to be certain of exactly which one you have. The reason is that the problem might be caused by the IDE not being correctly configured for your specific board.

Please tell us which of the following boards you are attempting to upload to:

If you aren't sure which one you have, you can provide a picture of the board or a link to the place you bought it from and we'll see if we can identify it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.