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.
- 1did you connect the Arduino to PC?2021-07-10 16:08:39 +00:00CommentedJul 10, 2021 at 16:08
- 1Yes I connected to PC. Under tools drop down box, Ports icon is greyed outGolden– Golden2021-07-10 17:06:14 +00:00CommentedJul 10, 2021 at 17:06
- 1Can you check in device manager that when you plug the arduino if any COM ports are available or shown thereMaaz Sk– Maaz Sk2021-07-10 17:09:59 +00:00CommentedJul 10, 2021 at 17:09
- 1I have just done that now and it displayed: Device type- Unknown, Location-Port_#0002.Hub_#0002. ThanksGolden– Golden2021-07-10 17:27:18 +00:00CommentedJul 10, 2021 at 17:27
- 1That 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 helpschrisl– chrisl2021-07-11 08:33:58 +00:00CommentedJul 11, 2021 at 8:33
1 Answer1
I know this problem from Arduino Uno clones. You need a proper driver. Here are a few:
- CH341 serial driver (e.g. for Vendor ID 1A86, Product ID 7523)
- Holtek UART bridge (e.g. for Vendor ID 04D9, Product ID B534)
- FTDI Drivers (e.g. for Vendor ID 0403, Product ID 60xx)
- CP210x Drivers (e.g. for Vendor ID 10C4, Product ID EAxx)
- Prolific PL2303 (e.g. for Vendor ID 067B, Product ID 23xx and AAxx)
- Microchip MCP2221 (for Vendor ID 04D8, Product IDs 00xx and 020x)
- Cypress CDC (e.g. for vendor ID 04B4, Product ID 00xx)
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.
Explore related questions
See similar questions with these tags.
