Trying to learn Arduino, found a couple of Arduino Mega 2560 that I can't get to upload a blink example. It's times out:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Failed uploading: uploading error: exit status 1
I can get the board info, so it's communicating thru USB COM port:
"Found couple..." makes me think the boards were used and maybe damaged.
Board info points to genuine Arduino board with ATmega16U2 chip as USB/serial transceiver.
ATmega 2560 (ATmega in general) needs the bootloader to be able to upload program via serial line.
But not only that. It needs:
~ power, the MCU must be powered properly,
~ clock source, Arduino Mega 2560 uses external resonator,
~ reset circuit, it must work properly,
~ serial line, data have to pass to and from it.
Let say the circuit is OK. You will need the programmer to upload the bootloader at the first place. Programmer, or another working Arduino. There are tons of information here, how to do it with another Arduino e.g., or if you have programmer like USBasp it is piece of cake.