Go Down

Topic: After running the Hello World in repeat mode (Read 1 time) previous topic - next topic

1946thom

I loading into my Arduino the Hello World sketch and it worked correctly. I then loaded in the repeating sketch and it seems to lock up my Arduino. I can't get it load in anything else, and the TX led is on all the time. I think I may have lost the ability for the computer to upload to the Adduino. Is there some way to reset the Arduino to clear out this sketch. Thom,

johnwasser

Unplug the USB cable.
Hold down the Reset button.
Plug in the USB cable.
Click on the Upload button for a sketch.
When you see the "Binary sketch size:" message in the sketch window, release the Arduino reset button.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

1946thom

I tried your sugestion.Now I get an error message of avrdude, stk 500(); programmer is not responding. When I release the reset button I get several flashes from the L led the it goes back into the TX led on steady. THom,

johnwasser


I tried your sugestion.Now I get an error message of avrdude, stk 500(); programmer is not responding. When I release the reset button I get several flashes from the L led the it goes back into the TX led on steady. THom,


Two possibilities:
    The USB driver is not ready in time when you click on the upload button.
    You are not releasing the Reset button in time.

Try this:

Unplug the USB cable.
Hold down the Arduino Reset button.
Plug in the USB cable.
WAIT TEN SECONDS.
Click on the Upload button for a sketch.
When you see the "Binary sketch size:" message in the sketch window, release the Arduino reset button.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

1946thom

It took me running your suggestion several times before I got it running again. Thank you so very much. Can you explain to me what happens when you do the sequence that you suggested. Thank you again. Thom,

smeezekitty

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

johnwasser

By popular demand... the explanation:

My theory is that a sketch with runaway serial output is filling a lot of buffers (possibly all of them) in the USB driver on your host system.  When you try to upload, either the commands do not get sent because there are no buffers available or the commands get sent and the responses are stuck behind a long queue of previous input.

1) Unplug the USB cable.  (This causes the USB driver to clear the buffers.)
2) Hold down the Arduino Reset button. (This prevents the Arduino sketch from running and flooding the buffers.)
3) Plug in the USB cable.  (This re-establishes the USB connection so you can upload.)
4) WAIT TEN SECONDS.  (This gives the USB driver time to settle.)
5) Click on the Upload button for a sketch. (This begins the compile process.)
6) When you see the "Binary sketch size:" message in the sketch window, release the Arduino reset button. (This allows the bootloader to run and look for upload commands.  The message signals the end of the compile process and the start of the upload process.)
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

James C4S

Quote
My theory is that a sketch with runaway serial output is filling a lot of buffers (possibly all of them) in the USB driver on your host system.


Well if this is the same bug as the original bug in the first Uno, it isn't the Host side's problem.  The 8u2 gets into an un-usable state when it is given a bunch of data and no where to send it.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

mromani

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286088093/all

Go Up