0

I am using Arduino Uno board with Windows 10. From the tutorials on Arduino website, I am trying to upload the following code:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(1);
}

It had undergone a series of issues:

First, avrdude: ser_open(): can't open device "\\.\com3"

I searched for his issue, and found that most common solution id to go to device manager and change the name of the port, then unplug and plug again the arduino board. I did that

Second,

C:\Program Files (x86)\Arduino\hardware\tools\axr\bin\avr-ar:
unable to rename 'core.a'; reason: file exists\\

I thiught it could be a memory problem. I used the reset button on the board, and repeated steps from the solution to the first problem. I tried to upload the code again.

But now, I am not getting any error message. But the problem is that it is taking forever to upload the code. I see Uploading... status since a long while. The green progress bar is also complete, but no uploading completed till now.

Any help to understand and solve this will be appreciated.

1

When the Arduino IDE says its uploading but never uploads, it is most likely a COM port issue. Try plugging the Arduino in a different port and make sure you change the port in the IDE. The problem seems to be you have changed the Arduino port, but not in the IDE. The Arduino IDE registers the previous port as open and tries to upload the program to that port. Go to Tools > Serial Port and it should list the ports(example):

COM 2
COM 3
Arduino Uno at COM 4
•COM 4

Every time you unplug and replug the Arduino you should check your ports and select the appropriate one ( It usually says Arduino *type* at COM *port number*

COM 2
COM 3
•Arduino Uno at COM 4
COM 5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.