Go Down

Topic: Arduino Uno not retaining sketch on power-off (Read 8947 times) previous topic - next topic


I'm entirely new to the Arduino platform but have some limited experience with other chips.  I have no problem uploading to my Uno via USB and running perfectly lovely sketches.  However, when I unplug the power and plug in a battery instead, or even plug the USB back in, the Uno always reverts to the factory default blink behavior.  Is there some protocol I need to follow in the software to get my sketch to stick? Thanks.


What happens if you upload a sketch, run it, then hit the reset button on the Uno?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


If I upload a sketch, run it, then hit the reset button, I see a couple of startup blinks and then the sketch begins to run again properly.

Coding Badly

The "startup blinks" are the bootloader saying hello.  I believe the bootloader runs 2 seconds.


Yeah, I get that.  The problem is that when I de- and re-power the board, the blinking just goes on forever, no matter what sketch was loaded before I powered down.  I feel like I'm just missing a step somewhere due to inexperience.


I think this is believed to be an instance of this bootloader bug:

Is this an Uno SMD ?  There have been reports that this is more likely to happen on those, though the explanation for that is not well understood.  Some vendors are replacing Uno SMDs with ones containing a patched bootloader.


Yes, this is an UNO SMD.  Thanks for pointing out this bug report! Is this something I can patch myself, or do I need to contact my vendor for a replacement?


Jan 20, 2011, 06:09 am Last Edit: Jan 20, 2011, 06:12 am by westfw Reason: 1
Is this something I can patch myself

It seems to be something that requires actually replacing the bootloader.  If you have the equipment to do that (possibly as little as a second arduino), you can do it yourself (the newer bootloader hex is downloadable from the google code repository, or you can compile it yourself.)

(It's not clear that all Arduino vendors will have stock of "fixed" Unos or the ability to fix their existing stock, though.)


Thanks, folks.  Based on your info I found this thread on the SparkFun forums that matches my experience exactly:


I'll take it up with SparkFun from here.  I guess I'm glad it wasn't anything I was doing wrong.  Thanks again!


I burned my UNO with the Duemilanove bootloader because of problems with Optiboot.  The IDE doesn't mind if I tell it its a Duemilanove.......

Go Up