Arduino UNO r3 board not recognized by pc

I had bought an Arduino Starter Kit quite recently.
I tried to upload the code for 7-segment Display but failed. The sketch is getting compiled successfully, but failed to upload it to the board. This is not the problem with only the 7-segment display, but I had also tried to upload the default projects. Nothing seemed to work.

The error message:

Arduino: 1.8.14 (Windows 10), Board: "Arduino Uno"

Sketch uses 1182 bytes (3%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

avrdude: ser_open(): can't open device "\\.\COM4": The semaphore timeout period has expired.




Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

I have also tried multiple ways as suggested by others such as restarting the pc, closing and reopening the app, resetting the Arduino board, and many others. Nothing gave a positive output.

My Laptop model:
Huawei MateBook D 15.

Windows Edition:
Windows 10 Home.

Can you supply a link to the Arduino UNO starter kit you bought please.

Can I ask if you installed the driver from a website or did the IDE do it for you?

I had bought it from Lazada, and here is the link:

I have installed both the Arduino app and Arduino IDE. When I choose the View Board info option, nothing happens and sometimes I'm able to see the text Board not recognized. So I see a port issue here. The connection is not established between the pc and the board.
Also, I have not installed any specific driver.

That is NOT an Arduino product. It is a clone, and uses the CH340 chip, you need to download the driver for the chip - here is a direct link

Hope this gets you up and running. :wink:

I have installed the driver from the link you provided. I'm still not able to see any changes.
Once again, my Arduino board has failed the loopback test and I'm not able to upload the code to the board (still the same error).

Maybe this provides the solution: avrdude: ser_open(): can't open device "\\.\COM5": The semaphore timeout period

Further, it's my understanding that the loopback test is not conclusive when it comes to clones if they use a different ttl-to-usb chip. It should be conclusive for the FTDI232 and 16U2 based boards.

Try :
Replacing the USB lead
Use different USB port
With the board plugged in, open the device manager, find the COM port, right click and uninstall, remove the driver also. Remove the USB cable. Restart the computer. Plug in the USB cable, and reinstall the driver. Note what COM port is created.

Try and report. :grinning: Hopefully we can get you up and running.

Oh right. I went through the link you provided, and checked whether my board is connected to Bluetooth. It is not connected. The problem still remains the same.

I tried everything you have mentioned - from replacing the USB lead to reinstalling the driver.

I went to the device manager, found the COM port and uninstalled it. When I came to Arduino IDE, I still saw COM 3 being selected (though I had uninstalled it). I restarted my system and also reinstalled the driver. I could notice COM 4 and COM 6 being created. COM 6 was new here as I was able to see COM 4 before restarting my system. And yet, the sketch is not being uploaded to the board.
This is the error message while uploading after trying the above methods:

Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Uno"

Sketch uses 1182 bytes (3%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: ser_open(): can't open device "\\.\COM6": The semaphore timeout period has expired.





This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Also, I'm a total newbie to this Arduino world. I'm just in 8th grade and have been learning about Arduino online. I just wanted to try it in real life. So, please don't mind if I ask some silly questions :sweat_smile:

Try each com port that is listed in the IDE, don't assume ANYTHING is working, or not working. If this fails, ask a friend to try it on their computer.

I tried many ways, and finally the sketch got uploaded. The new problem is that nothing is happening to the setup I have arranged, which is the 7-segment display.
I am currently using COM 3 (which is uploading the sketch perfectly fine).
This is the code I have written:

//7 segment Display
// C++ code
//
void setup()
{
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
}

void loop()
{
  digitalWrite(0, HIGH);
  digitalWrite(1, HIGH);
  digitalWrite(2, HIGH);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, LOW);
  digitalWrite(7, HIGH);
  digitalWrite(0, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(0, LOW);
  digitalWrite(1, HIGH);
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW); 
  digitalWrite(5, LOW);
  digitalWrite(6, HIGH);
  digitalWrite(7, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(0, LOW);
  digitalWrite(1, HIGH);
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
}


DON'T use these pins, this is why you are having issues uploading!!

Also, HOW is your display wired? What value of resistors are you using? Have you tested the pins with a multimeter?

I have edited my code (just replaced the numbers 0 and 1):

//7 segment Display
// C++ code
//
void setup()
{
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}

void loop()
{
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, LOW);
  digitalWrite(6, HIGH);
  digitalWrite(7, HIGH);
  digitalWrite(8, LOW);
  digitalWrite(9, HIGH);
  digitalWrite(2, HIGH);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(2, LOW);
  digitalWrite(3, HIGH);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW); 
  digitalWrite(7, LOW);
  digitalWrite(8, HIGH);
  digitalWrite(9, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
  digitalWrite(2, LOW);
  digitalWrite(3, HIGH);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, HIGH);
  digitalWrite(7, LOW);
  digitalWrite(8, LOW);
  digitalWrite(7, LOW);
  delay(1000); // Wait for 1000 millisecond(s)
}

The display is connected to the board using male and female end wires. Male end goes into the board and the female end goes into the display (except the "common" port at the bottom of the display, which is connected to the resistor - the wire is connected to the 5V port on the board).

I am using a 220 ohms resistor. I should be using 200 ohms resistor but I don't have it at the moment. As tested in an online simulation platform (Tinkercad), the output is the same. I have also tried using a 10,000 ohms (which gives a different output), but nothing worked out.

No, I have not tested the pins with a multimeter as I don't have one.

It is not related to the problem..., but
For 7-segment LEDs, the resistors are not common and must be use on each segment line for a total of 7 resistors.

Oh, I didn't know that. As per what my school had taught me, the resistor must be fitted into the anode common port.
Anyway, I tried what you have suggested in Tinkercad and the output is same as before. But, instead of 7 resistors I have given it as 9 resistors (each in a port, instead of the cathode common port). But I don't have enough resistors to try it physically.

After almost 2 months:
It is still not working. I have tried whatever I know from my side. I tested the same on Mac. It is getting uploaded but nothing shows up on the board. I have tried changing the resistors, plug, etc,. The issue persists.

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