I've got this error message in arduino ide like this avrdude: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified., i've tried many solutions, same error

FQBN: arduino:avr:uno
Using board ‘uno’ from platform in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core ‘arduino’ from platform in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used…
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Adafruit_MotorShield.h: [Adafruit Motor Shield V2 Library@1.1.3]
ResolveLibrary(Adafruit_MotorShield.h)
→ candidates: [Adafruit Motor Shield V2 Library@1.1.3]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.15.0]
ResolveLibrary(Adafruit_I2CDevice.h)
→ candidates: [Adafruit BusIO@1.15.0]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
→ candidates: [Wire@1.0]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for AFMotor.h: [Adafruit Motor Shield library@1.0.1]
ResolveLibrary(AFMotor.h)
→ candidates: [Adafruit Motor Shield library@1.0.1]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library -IC:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp -o nul
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
→ candidates: [SPI@1.0]
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp
Generating function prototypes…
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o C:\Users\ADMIN\AppData\Local\Temp\549547831\sketch_merged.cpp
C:\Users\ADMIN\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives C:\Users\ADMIN\AppData\Local\Temp\549547831\sketch_merged.cpp
Compiling sketch…
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp.o”
Compiling libraries…
Compiling library “Adafruit Motor Shield V2 Library”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “-IC:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility” “c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp.o”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “-IC:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility” “C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp.o”
Compiling library “Adafruit BusIO”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.o”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp.o”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp.o”
Compiling library “Wire”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\Wire.cpp.o
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\utility\twi.c.o
Compiling library “Adafruit Motor Shield library”
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp.o”
Compiling library “SPI”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\SPI\SPI.cpp.o
Compiling core…
Using precompiled core: C:\Users\ADMIN\AppData\Local\Temp\arduino\cores\arduino_avr_uno_f9a35ba1929c15e041a07b0ee941de85\core.a
Linking everything together…
“C:\Users\ADMIN\AppData\Local\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 “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\Wire.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\utility\twi.c.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\SPI\SPI.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/…\…\cores\arduino_avr_uno_f9a35ba1929c15e041a07b0ee941de85\core.a” “-LC:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4” -lm
“C:\Users\ADMIN\AppData\Local\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 “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.eep”
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy” -O ihex -R .eeprom “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.hex”

Using library Adafruit Motor Shield V2 Library at version 1.1.3 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library
Using library Adafruit BusIO at version 1.15.0 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
Using library Adafruit Motor Shield library at version 1.0.1 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library
Using library SPI at version 1.0 in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-size” -A “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf”
Sketch uses 2788 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 132 bytes (6%) of dynamic memory, leaving 1916 bytes for local variables. Maximum is 2048 bytes.
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude” “-CC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf” -v -patmega328p -carduino “-PCOM4” -b115200 -D “-Uflash:w:C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.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\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM4
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can’t open device “\.\COM4”: The system cannot find the file specified.

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

Hey you should close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port.
free the Arduino(remove connections), remove code, disconnect, then reconnect the Arduino, and upload code again. This might work.

I’ve tried that already in the beginning, same problem, I’ve been trying this solution since 30th jan, I’ve tried many steps but still same error

Hi @dhanushchowdary.bca

The error message “avrdude: ser_open(): can’t open device “.\COM4”: The system cannot find the file specified” typically indicates that the Arduino IDE is unable to communicate with the Arduino board connected to the specified COM port .

You can check this link , this will help solve your problem: https://stackoverflow.com/questions/25718779/arduino-nano-avrdude-ser-opensystem-cant-open-device-com1-the-sys

If you still face any issues, please feel free to get back to us.

still same error, but in device manager under ports it’s showing me exclamatory mark


please help me!

Can you please share photo of your circuit connections? Also share a screenshot of your code error in Arduino.

Also if you can tell us a bit more about what you are trying to build, it will help us debug the issue faster.

thanks for the help pranav, i was building a car using bolt few days back, after finishing 20% of the final project, next day morning while uploading the code i’ve got this error(complete error):

FQBN: arduino:avr:uno
Using board ‘uno’ from platform in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core ‘arduino’ from platform in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used…
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Adafruit_MotorShield.h: [Adafruit Motor Shield V2 Library@1.1.3]
ResolveLibrary(Adafruit_MotorShield.h)
→ candidates: [Adafruit Motor Shield V2 Library@1.1.3]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Adafruit_I2CDevice.h: [Adafruit BusIO@1.15.0]
ResolveLibrary(Adafruit_I2CDevice.h)
→ candidates: [Adafruit BusIO@1.15.0]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
→ candidates: [Wire@1.0]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Alternatives for AFMotor.h: [Adafruit Motor Shield library@1.0.1]
ResolveLibrary(AFMotor.h)
→ candidates: [Adafruit Motor Shield library@1.0.1]
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o nul
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library -IC:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp -o nul
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
→ candidates: [SPI@1.0]
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\Wire.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility\twi.c
Using cached library dependencies for file: c:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp
Using cached library dependencies for file: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp
Generating function prototypes…
C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library -IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp -o C:\Users\ADMIN\AppData\Local\Temp\3341168665\sketch_merged.cpp
C:\Users\ADMIN\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives C:\Users\ADMIN\AppData\Local\Temp\3341168665\sketch_merged.cpp
Compiling sketch…
“C:\Users\ADMIN\AppData\Local\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_UNO -DARDUINO_ARCH_AVR “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src” “-Ic:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library” “-IC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp” -o “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp.o”
Compiling libraries…
Compiling library “Adafruit Motor Shield V2 Library”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp.o
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp.o
Compiling library “Adafruit BusIO”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.o
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp.o
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp.o
Compiling library “Wire”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\Wire.cpp.o
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\utility\twi.c.o
Compiling library “Adafruit Motor Shield library”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp.o
Compiling library “SPI”
Using previously compiled file: C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\SPI\SPI.cpp.o
Compiling core…
Using precompiled core: C:\Users\ADMIN\AppData\Local\Temp\arduino\cores\arduino_avr_uno_f9a35ba1929c15e041a07b0ee941de85\core.a
Linking everything together…
“C:\Users\ADMIN\AppData\Local\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 “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\sketch\successall4motorslrfb.ino.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\Adafruit_MotorShield.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_V2_Library\utility\Adafruit_MS_PWMServoDriver.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\Wire.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Wire\utility\twi.c.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\Adafruit_Motor_Shield_library\AFMotor.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4\libraries\SPI\SPI.cpp.o” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/…\…\cores\arduino_avr_uno_f9a35ba1929c15e041a07b0ee941de85\core.a” “-LC:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4” -lm
“C:\Users\ADMIN\AppData\Local\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 “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.eep”
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy” -O ihex -R .eeprom “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf” “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.hex”

Using library Adafruit Motor Shield V2 Library at version 1.1.3 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_V2_Library
Using library Adafruit BusIO at version 1.15.0 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
Using library Adafruit Motor Shield library at version 1.0.1 in folder: C:\Users\ADMIN\Documents\Arduino\libraries\Adafruit_Motor_Shield_library
Using library SPI at version 1.0 in folder: C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-size” -A “C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.elf”
Sketch uses 2788 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 132 bytes (6%) of dynamic memory, leaving 1916 bytes for local variables. Maximum is 2048 bytes.
“C:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude” “-CC:\Users\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf” -v -patmega328p -carduino “-PCOM4” -b115200 -D “-Uflash:w:C:\Users\ADMIN\AppData\Local\Temp\arduino\sketches\954D85388230FC402168FA607BEAB7E4/successall4motorslrfb.ino.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\ADMIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM4
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can’t open device “\.\COM4”: The system cannot find the file specified.

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

i’ve researched for 2 days, same error, then i’ve removed all connections(i’ve connected only arduino, l293d, car chassis), then i’ve tried uploading empty code. same error.
my code in arduino before and after error:
#include <Adafruit_MotorShield.h>
#include <AFMotor.h>

AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:
motor1.setSpeed(255);
motor2.setSpeed(255);
motor3.setSpeed(255);
motor4.setSpeed(255);
forward();
delay(1000);
backward();
delay(1000);
left();
delay(2500);
right();
delay(2500);
stop();
delay(1000);
}

void forward(){
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
}

void backward(){
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
}

void left(){
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
}

void right(){
motor4.run(FORWARD);
motor3.run(FORWARD);
motor2.run(BACKWARD);
motor1.run(BACKWARD);
}

void stop(){
motor1.run(RELEASE);
motor2.run(RELEASE);
motor3.run(RELEASE);
motor4.run(RELEASE);
}

i’m trying to build a basic self driving car

@dhanushchowdary.bca Sorry for the slower reply. We don’t work with Arduino often hence it we might not be able to directly solve the issue. However, I will definitely try to provide some suggestions that might help in debugging the issue.

1st step will be to ensure that your Arduino is having issue or not. Try the below suggestions.

  1. Try to upload the simple LED blink program from the Arduino examples section under the file menu.
  2. If that doesn’t work then connect the USB to the other ports of your computer and select the port and check if that works.
  3. If both the above points don’t work, is it possible to program the LED blinking code from your friend’s computer? If it programs then you know there is an issue with the Arduino IDE with your computer. If it doesn’t work with friend’s computer as well then we can confirm that mostly the issue is with the Arduino or the USB cable.

Do try out the above steps and let me know.

Your port connection might not be found by the aurdino which you have connected.In google type port you need , you will get a json file download it and restart your aurdino you will the port you need to connect. Check it out.