Sketches Not Uploading To Mega

I bought a Mega 2560 R3 from Radioshack a few days ago. I tried it on one computer, and it woldn't upload any sketches. On my second computer, it was able to upload Blink but when I tried the AnalogReadSerial, DigitalReadSerial, and BareMinimum, it wouldn't work. I did the loopback test and that worked fine. I am using XP. Here is my error code:

Binary sketch size: 678 bytes (of a 258048 byte maximum)
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
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode

I'm having a the same problem

I am able to get sketches uploaded, however, I am unable to use avrdude to upload anything to the ATmega 2560. It seems like a lot of people are having this same issue, however, there does not appear to be a consistent solution.

Would it be safe to try using the "Upload Using Programmer" option? What is the difference?

If the Mega is installed in windows correctly it posts as a com port in the device manager under ports com/lpt. Windows 7 users will have to download the divers from arduino.cc and then manually browse the arduino-1.0\drivers directory from the device manager update driver utility. The unistalled mega will be listed as an unknown device on USBxx where xx is the hub's logical port.

I am currently running Windows XP. The com port does show up in
->->->-><Ports (Com & Lpt)>-><Arduino Mega 2560 R3 (Com4)>

I have tried all of the Reset advice provided in the documented solution (i.e. hold the button down and run run avrdude) but still the best I can get is the Timeout() error. Is there some other piece of information that I can provide to assist in debugging this?

I thought this might help, let me know if anyone needs more:

avrdude -F -v -pm2560 -cstk500v2 -P\.\COM4 -b19200 -D -Uflash:w:"C:\Documents and Settings\Mozart\My Documents\Arduino Test Project\MEGA_GPIO_EXAMPLE1\MEGA_GPIO_EXAMPLE1\Debug\MEGA_GPIO_EXAMPLE1.hex":i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Arduino\arduino-1.0\hardware\tool
s\avr\bin\avrdude.conf"

Using Port : \.\COM4
Using Programmer : stk500v2
Overriding Baud Rate : 19200
avrdude: stk500v2_ReceiveMessage(): timeout

Hpw did you get that? And can we try to fix my problem?

I'm going to get a replacement but it wouls still have been nice to be able to fix it.

Sorry Dante, didn't mean to hijack the thread. I thought you were experiencing the same issue as I was. I will open a new thread. I hope you figure this thing out...I hope I figure mine out too.

The serial monitor ties up the com port just as an upload would, make sure no serial monitors are open, go to com4's properties and click advanced, set a port spec above com10. Select the applicable port in the ports menu in the arduino ide tools....Serial Ports

My new board is working fine now.

Well I was able tp upload fine to it yesterday and now this one isn't working either. The last program I uploaded was the one for a PING, and it will still send the measurements from it back over serial. I've tried changing the COM number and that won't work. When I uploades ysterday, the TX/RX both blinked very rapidly but now they both blink every seconds. It's the same error as last time.

Edit: Now the onboard LED and TX are both permanetly on.

what external devices are connected to this board?

I've tried it with both ping hooked up and with nothing hooked up.

Well apparently i was mislead into thinking that Arduino had a great community to get help from.

Dante12129:
Well apparently i was mislead into thinking that Arduino had a great community to get help from.

First of all, lose the attitude.
Did it ever work? If so what were you doing when it stopped working?

It was runninthe example for the PING sensor.

Dante12129:
It was runninthe example for the PING sensor.

What was connected and how?
Please try the loop back test that is stickyed to the top of this board.

It was connected like in the tutorial. The loopback test works fine and everything is echoed.

EDIT: Also, the LED stays solid whenever I have it powered on.