Firmware Error Occurred while Uploading the Sketch

I’m getting this Error message

Arduino: 1.8.12 (Windows 10), Board: “Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)”

Sketch uses 56248 bytes (22%) of program storage space. Maximum is 253952 bytes.
Global variables use 2009 bytes (24%) of dynamic memory, leaving 6183 bytes for local variables. Maximum is 8192 bytes.
An error occurred while uploading the sketch
avrdude: ser_open(): can’t open device “\.\COM6”: Access is denied.

avrdude: ser_drain(): read error: The handle is invalid.

avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

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

I don’t know what it means can someone please help

1 Like

Hi @Blue_Nog

Is Com6 the correct port for the Arduino? To check, with the Arduino unplugged, open the device manager and expand the Ports (COM & LPT) section. Now plug in the Arduino and see what port is added to the list. Set that port in the arduino IDE.

Kind regards, Gero

1 Like