Could upload before, now unloading a sketch doesn't complete.

arduino UNO. Arduino 1.0.3. The old sketch I have on the arduino works fine. It reads a pot and serial.prints the value. The problem is that I’m unable to upload a new sketch. The sketch compiles, begins to upload and then just sits there at about 80%. Never finishes. I have to unplug it or reset it. When I do, the old sketch is still there running. You can tell that it’s trying to accept the new sketch bc the RX TX lights start blinking but then it TX light just stays solid and nothing happens.


I did. The right port is selected. The right board is selected. Everything is unplugged from the board. Drivers are fine because it worked before.

It clearly tries to upload as I can see rx tx blinking when I hit upload. It never finishes though and the old program remains. What do I test next?

What did the loopback test show?

Also try a different PC/Mac. (A friend's, a laptop, whatever). That rules in/out the PC or the board.

I did the loopback test. I used serial monitor. It worked fine. I could see everything I typed returned back to me. What's next? When uploading a sketch, it just sites there at ~90%

Can you turn on verbose output (see preferences) for uploading? Post the last part of what you see there. Thanks.

Binary sketch size: 2,806 bytes (of a 32,256 byte maximum) C:\Users\Admin\Desktop\arduino-1.0.3\hardware/tools/avr/bin/avrdude -CC:\Users\Admin\Desktop\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\.\COM3 -b115200 -D -Uflash:w:C:\Users\Admin\AppData\Local\Temp\build2330982894507240071.tmp\test.cpp.hex:i

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

System wide configuration file is "C:\Users\Admin\Desktop\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM3 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: 1 [31] avrdude: stk500_getsync(): not in sync: resp=0x31

It obviously works and passes the loopback test. What do I test next to get it to accept uploads?

The thing is, that isn't 80% of the way through. That 80% must have been the compiling part. It appears to be failing at the very first received byte.

Previously, did you do anything (during testing) that might account for this, such as putting an LED into a pin without a resistor, plugging in the power backwards, that sort of stuff?

yea. I took the main chip out, put it into another device that uses arduino, it didn't work, then I put it back. So yea, there could be something wrong with the chip. The progream that was was last loaded onto it works fine though. It reads a pot and outputs the data. It passes the loopback test too. So, what's next to test? I have a scopemeter. What's next to test?

I'm not sure if you have damaged it or not. If it passes the loopback test that suggests the USB interface is OK.

If you have another Uno lying around I suggest you try my "chip detector" sketch:

I don't. Why can't that be done with a computer instead of a second arduino? Isn't there a way to wipe it clean and reinstall the bootloader or some other similar reset?

You need another Arduino, or a programming device, to upload the bootloader or wipe the chip. Programmers can be obtained for around $10 on eBay or similar places.

The problem was that the arduino was on COM port 878 and the arduino software wasn't programmed well enough enough to figure that out. It didn't even notice that there was an issue and just assumed it was on COM 3. I had to clear the unused comports so that the arduino could be on a port it was capable of using, like COM 3.

Comport 878 eh?

I was going to laugh at Windows, until I remembered that OS/X keeps renaming my Mac. Right now it is iMac5 (417). So it has been renamed 417 times for no obvious reason.