2

After running the Arduino Program on my Windows machine I got the following error my code and error are as below.

Also the COM port was turned grey i.e. disbaled.

#include <LiquidCrystal.h>LiquidCrystal lcd(12,11,5,4,3,2);void setup(){  lcd.begin(16, 2);}void loop(){  lcd.print("Hello, World!");  delay(500);  lcd.clear();  delay(500);}

It displayed as shown below

Arduino: 1.8.14 (Windows 10), Board: "Arduino Uno" Sketch uses 1894bytes (5%) of program storage space. Maximum is 32256 bytes. Globalvariables use 59 bytes (2%) of dynamic memory, leaving 1989 bytes forlocal variables. Maximum is 2048 bytes. Serial port not selected.

Maaz Sk's user avatar
Maaz Sk
3453 silver badges16 bronze badges
askedJul 10, 2021 at 16:05
Golden's user avatar
6
  • 1
    did you connect the Arduino to PC?CommentedJul 10, 2021 at 16:08
  • 1
    Yes I connected to PC. Under tools drop down box, Ports icon is greyed outCommentedJul 10, 2021 at 17:06
  • 1
    Can you check in device manager that when you plug the arduino if any COM ports are available or shown thereCommentedJul 10, 2021 at 17:09
  • 1
    I have just done that now and it displayed: Device type- Unknown, Location-Port_#0002.Hub_#0002. ThanksCommentedJul 10, 2021 at 17:27
  • 1
    That means, that Windows has no appropriate driver for it. Do you have a cheap Uno clone? Then you need to install the ch340 driver (which is the USB interface chip on mist cheap Uno/Nano clones). Please try and report if that helpsCommentedJul 11, 2021 at 8:33

1 Answer1

1

I know this problem from Arduino Uno clones. You need a proper driver. Here are a few:

After installing the driver, Windows recognizes the board as a serial port and Arduino IDE will list the serial ports identified by Windows.

Look up the details in device manager. You'll find the IDs in the details of the device namedDevice instance path. It looks like...VID_xxxx?PID_yyyy... where xxxx is the vendor ID and yyyy is the product ID. You can also install all drivers, if you don't know which one to choose.

Another (but rare) issue could be that you interrupted the driver setup during Arduino IDE installation. In that case, run the Arduino IDE installation again and make sure you allow the driver installations (for Vendor ID 2341 and 2A03, Product IDs 0043, 0001, 0243).

Any of these suggestions will require administrator permissions.

answeredJul 12, 2021 at 8:06
Thomas Weller's user avatar

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.