Problem with IDE or libraries Edit: with board or connector

I am compiling given code (not uploading). @arduinojanuary @xfpd

#include <LiquidCrystal.h>
#include <dht.h>

#define dht_apin A0
dht DHT;

const int rs =12, en = 11, d4 = 5,d5 = 4,d6 = 3,d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int con = 0;

const int sense_pin = A1;

int relay = 8;
int pump = 0;


void setup() {

  analogWrite(7,con);
  pinMode(relay, OUTPUT);
  Serial.begin(9600);
  delay(1000);
  Serial.println("Welcome to Plant Temperature reader");
  lcd.begin(16,2);
  delay(1000);
  lcd.clear();
  
}

void loop() {
  DHT.read22(dht_apin);

  
  int moist;
  int sense_apin;
  sense_apin = analogRead(sense_pin);
  moist = (100-((sense_apin/1023) * 100));

  Serial.print("Current temperature=");
    Serial.print(DHT.temperature);
    Serial.print("°C\n\n");
    Serial.print("Current Humidity=");
    Serial.print(DHT.humidity);
    Serial.print("%\n\n");
    Serial.print("Current Soil moisture=");
    Serial.print(moist);
    Serial.print("%\n\n");
    delay(1000);

  if(moist<15){

    digitalWrite(relay,HIGH);
    pump = 1;

  }
  else{

    digitalWrite(relay, HIGH);
    pump = 0;

  }
  
  
  
  if(DHT.temperature<60 || DHT.temperature>-30 && DHT.humidity>0){

    lcd.setCursor(0,0);
    lcd.print("Temper..=");
    lcd.setCursor(15,0);
    lcd.print("C");
    lcd.setCursor(0,1);
    lcd.print("Humidity=");
    lcd.setCursor(15,1);
    lcd.print("%");

    lcd.setCursor(9,0);
    lcd.print(DHT.temperature);

    lcd.setCursor(9,1);
    lcd.print(DHT.humidity);

    delay(2000);

    lcd.clear();

    lcd.setCursor(0,0);
    lcd.print("Soil moist=");
    lcd.setCursor(12,0);
    lcd.print(moist);
    lcd.setCursor(15,0);
    lcd.print("%");
    lcd.setCursor(0,1);
    lcd.print("Water pump");

    if(pump==0){

      lcd.setCursor(11,1);
      lcd.print("OFF");

    }

    else{

      lcd.setCursor(11,1);
      lcd.print("ON");

    }

    delay(2000);
    
  }

  if(DHT.temperature>60 || DHT.temperature<-30 || DHT.humidity==0){
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Maybe an error");
    lcd.setCursor(0,1);
    lcd.print(" has occured!");
    delay(2000);
  }

  
}

Given that this code was working well like a hour ago. I am compiling for Arduino nano. Pls help.

Edit:heres the error msg

exec: "C:\\Users\\adich\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++": executable file not found in %PATH%

Compilation error: exec: "C:\\Users\\adich\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++": executable file not found in %PATH%

Topic moved to a more suitable location on the forum.

So what's the problem? Code compiles here with one warning. So it's possibly something else.

C:\Users\bugge\AppData\Local\Temp\.arduinoIDE-unsaved20241110-15716-1gkug42.hajq\sketch_dec10b\sketch_dec10b.ino: In function 'void loop()':
C:\Users\bugge\AppData\Local\Temp\.arduinoIDE-unsaved20241110-15716-1gkug42.hajq\sketch_dec10b\sketch_dec10b.ino:66:53: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if (DHT.temperature < 60 || DHT.temperature > -30 && DHT.humidity > 0)
                               ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

I re installed IDE so wait till I recompile it

@sterretje heres the error

exec: "C:\\Users\\adich\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++": executable file not found in %PATH%

Compilation error: exec: "C:\\Users\\adich\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++": executable file not found in %PATH%

Some possibilities

  1. Corrupt install.
    • Downgrade the AVR board package from 1.8.6 to a lower version.
    • Test.
    • Next upgrade again to 1.8.6.
  2. Your antivirus might consider avr-g++ a virus and either blocks access to it or removes it.
    • Check the logs.
    • Whitelist the Arduino15 directory.

Try uninstalling and download a different version from the official website.
Restart your computer

You mean that it compiled on the IDE right? (just confirming)

1 Like

yes (it compiled now after reinstalling)

heres upload error:

Sketch uses 6348 bytes (20%) of program storage space. Maximum is 30720 bytes.
Global variables use 431 bytes (21%) of dynamic memory, leaving 1617 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd9
Failed uploading: uploading error: exit status 1

Wrong board selected in tools or wrong processor selected under tools/processor.

guys isnt this nano. i can clearly see ATMEGA 328P on the micro controller
@sterretje @arduinojanuary @xfpd


Hi @flyex10. I'm going to ask you to provide the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

(Note: I have your code running... your connection issue is your hardware/wiring)

Not really. "moist" returns 100% or 0% because you are using an "int" in a division. You need to change this

  int sense_apin;

to this...

  float sense_apin;

... and you will get the expected results.

1 Like

@ptillisch heres Verbose output:

/usr/local/bin/arduino-cli compile --fqbn arduino:avr:nano:cpu=atmega328 --build-cache-path /tmp --output-dir /tmp/1276217992/build --build-path /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A -v /tmp/1276217992/new_sketch_1733841572585
FQBN: arduino:avr:nano
Using board 'nano' from platform in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6

Detecting libraries used...
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp -o /dev/null
Alternatives for LiquidCrystal.h: [LiquidCrystal@1.0.7]
ResolveLibrary(LiquidCrystal.h)
  -> candidates: [LiquidCrystal@1.0.7]
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp -o /dev/null
Alternatives for dht.h: [DHTlib@0.1.36 UncleRus@1.0.1]
ResolveLibrary(dht.h)
  -> candidates: [DHTlib@0.1.36 UncleRus@1.0.1]
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src -I/home/builder/Arduino/libraries/dhtlib_0_1_36 /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp -o /dev/null
Using cached library dependencies for file: /home/builder/Arduino/libraries/liquidcrystal_1_0_7/src/LiquidCrystal.cpp
Using cached library dependencies for file: /home/builder/Arduino/libraries/dhtlib_0_1_36/dht.cpp
Generating function prototypes...
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src -I/home/builder/Arduino/libraries/dhtlib_0_1_36 /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp -o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/preproc/sketch_merged.cpp
/home/builder/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/preproc/sketch_merged.cpp
Compiling sketch...
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src -I/home/builder/Arduino/libraries/dhtlib_0_1_36 /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp -o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp.o
Compiling libraries...
Compiling library "LiquidCrystal"
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src -I/home/builder/Arduino/libraries/dhtlib_0_1_36 /home/builder/Arduino/libraries/liquidcrystal_1_0_7/src/LiquidCrystal.cpp -o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/libraries/liquidcrystal_1_0_7/LiquidCrystal.cpp.o
Compiling library "DHTlib"
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs -I/home/builder/Arduino/libraries/liquidcrystal_1_0_7/src -I/home/builder/Arduino/libraries/dhtlib_0_1_36 /home/builder/Arduino/libraries/dhtlib_0_1_36/dht.cpp -o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/libraries/dhtlib_0_1_36/dht.cpp.o
Compiling core...
Using precompiled core: /tmp/core/arduino_avr_nano_cpu_atmega328_2d9ca7a8837208bf7e7d24956bac8285/core.a
Linking everything together...
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.elf /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/sketch/new_sketch_1733841572585.ino.cpp.o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/libraries/liquidcrystal_1_0_7/LiquidCrystal.cpp.o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/libraries/dhtlib_0_1_36/dht.cpp.o /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/../core/arduino_avr_nano_cpu_atmega328_2d9ca7a8837208bf7e7d24956bac8285/core.a -L/tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A -lm
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.elf /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.eep
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.elf /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.hex
Multiple libraries were found for "dht.h"
  Used: /home/builder/opt/libraries/dhtlib_0_1_36
  Not used: /home/builder/opt/libraries/unclerus_1_0_1
Using library LiquidCrystal at version 1.0.7 in folder: /home/builder/opt/libraries/liquidcrystal_1_0_7 
Using library DHTlib at version 0.1.36 in folder: /home/builder/opt/libraries/dhtlib_0_1_36 
/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /tmp/arduino-build-5EBD934CAAC162084B09205A03BF450A/new_sketch_1733841572585.ino.elf
Sketch uses 6324 bytes (20%) of program storage space. Maximum is 30720 bytes.
Global variables use 432 bytes (21%) of dynamic memory, leaving 1616 bytes for local variables. Maximum is 2048 bytes.

Used library  Version Path                                           
LiquidCrystal 1.0.7   /home/builder/opt/libraries/liquidcrystal_1_0_7
DHTlib        0.1.36  /home/builder/opt/libraries/dhtlib_0_1_36      

Used platform Version Path                                                        
arduino:avr   1.8.6   /home/builder/.arduino15/packages/arduino/hardware/avr/1.8.6


Flashing with command:C:/Users/adich/.arduino-create/arduino/avrdude/6.3.0-arduino17/bin/avrdude.exe -CC:/Users/adich/.arduino-create/arduino/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:/Users/adich/AppData/Local/Temp/arduino-create-agent3302171903/new_sketch_1733841572585.hex:i
avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch
         System wide configuration file is "C:/Users/adich/.arduino-create/arduino/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xa7
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xa7

What should I do with this problem

Please try this experiment and then report back with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Connect the Arduino board to your computer with a USB cable.
  2. Press and release the button on the Arduino board that is marked "RESET".

Now please reply here on the forum thread with the answers to the following questions:

  • Did you see the LED marked "L" on the board blink immediately after you released the "RESET" button?
  • Did the LED blink only once, or did it blink multiple times quickly immediately after releasing the button?

@ptillisch I have two boards. On one it is blinking, while on other it is not , Still it is not uploading, is it a error withmy uploading cable

Do you get the same "avrdude: stk500_recv(): programmer is not responding" error when you attempt to upload to both of the boards? Or does the problem only occur with one of the boards?

Please answer this question:

@ptillisch

I am getting same programmer not responding for both boards.

It is blinking multiple times on one board while not in another.

OK, that is good. The blink after reset eliminates some possible causes of the upload error. We now know two things about the board that blinks:

  • The primary microcontroller on the board is running
  • The bootloader program that handles sketch uploads is present on the microcontroller.
  • You have correctly configured Arduino IDE for use with this board.

This result tells us that one of the following two things is happening on the board that doesn't blink:

  • The microcontroller on the board is not running.
  • The bootloader (a program stored in a special area of memory in the microcontroller that handles sketch uploads) was somehow erased or corrupted.

For now, let's focus our attention exclusively on the board that blinks. Trying to troubleshoot two different boards that apparently have different problems will be sure to cause confusion. Please disconnect the board that doesn't blink from your computer and put it in a drawer until we request you to get it back out again.

This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.

Please perform this experiment to verify that the port you have selected is your Arduino board:

  1. Disconnect the USB cable of the Arduino board that blinks from your computer.
  2. Select Tools > Port from the Arduino IDE menus.
  3. Take note of the ports (if any) listed in the menu.
  4. Close the Tools menu.
    :exclamation: The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Connect the Arduino board that blinks to your computer with a USB cable.
  6. Select Tools > Port from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.

If you saw a new port appear at the last step, select that port from the Tools > Port menu and try uploading again.

If this doesn't solve the problem, please reply here on this forum thread with the answers to the following questions:

  • While following those instructions, did you see a port in the Tools > Port menu at step (6) that was not present at step (3)?
  • If you did see a new port, was the upload successful after you selected that port?

@ptillisch
there was listed "COM 3" when board was not connected in GRAY

after connecting, button became clickable and listed only one port "COM 3"

Was the upload successful after you selected that port?