Pages: [1]   Go Down
Author Topic: After running the Hello World in repeat mode  (Read 1310 times)
0 Members and 1 Guest are viewing this topic.
Madison, Wisc.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8081
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Tell him Why he needs to do that ...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Madison, Wisc.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8081
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Madison, Wisc.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
Logged

Washington
Offline Offline
God Member
*****
Karma: 30
Posts: 779
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This bug hasn't been fixed yet?
Logged

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!

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8081
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
God Member
*****
Karma: 1
Posts: 596
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: