[SOLVED] Uploading error

I dont know what to do anymore, tried uploading Blink to an Arduino Mega2560 V3.
I tried:
-Changing cable
-Uninstalling and reinstalling a new version of the arduino IDE
Error code:

Sketch uses 1536 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can't set com-state for "\\.\COM9"
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 parameter is incorrect.


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 parameter is incorrect.


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 parameter is incorrect.


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 parameter is incorrect.


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 parameter is incorrect.


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 parameter is incorrect.


avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
 does not exist or your board is not connected

Do you have the right board type and serial port selected in the IDE menu?

Yes, I have.

2020-06-26_19h25_26.png

Unplug the Arduino. Open the IDE. Look at the Tools, Port menu. What does it say? Plug in the Arduino. Look at the Tools, Port menu. What does it say?

Is the Mega a genuine Arduino with or a "clone"? With some clones, the serial port can change depending on which USB port you are plugged into.

I have found out the issue in the end. It turns out the VFD I was using was causing electrical noise in the data wires of my usb cable. I was powering the VFD using USB power. Once I added a separate power source for the VFD, all problems instantly cleared.
I'd close this post, since the problem has been solved, but I am not sure how.

1 Like

The best that you can do is to edit the title of your thread to add "Solved".