Greece
Offline
Newbie
Karma: 0
Posts: 13
Greek Tinker
|
 |
« on: February 23, 2011, 12:23:58 pm » |
Hello everyone!
I bumped to a problem as i was playing with my arduino. I was working with serial communications on arduino. So I wrote a sketch, put a
Serial.println();
command in loop() (I missed my inner if loop, and it runs infinitely) so now i try to upload a new program but i can't because the program keeps printing println on the serial port. Is there a way I can wipe out the program? Preferably a hardware way cause software doesn't seem to work...
P.S. I tried anything obvious (reset, unplug and replug) etc
Thanks!
|
|
|
|
« Last Edit: March 01, 2011, 06:42:02 am by Space_Tinkerer »
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 108
Posts: 6615
|
 |
« Reply #1 on: February 23, 2011, 01:16:53 pm » |
On modern Arduinos the upload process should reset the processor for you and cause the bootloader to run. On older models you had to push the reset button just before the upload happened. You should be able to upload a new sketch if you press the Reset button at just the right time.
If you have a second Arduino you can use it as an In-system Serial Programmer to upload a sketch. That doesn't go through the USB port on the target Arduino so it will override any existing programming.
|
|
|
|
|
Logged
|
|
|
|
|
Greece
Offline
Newbie
Karma: 0
Posts: 13
Greek Tinker
|
 |
« Reply #2 on: February 23, 2011, 01:25:43 pm » |
Thanks for the answer John. Actually I fixed it hitting the upload button about 20 times...  As you mentioned uploading should reset the processor (I have a new Arduino Uno, which I bought about 2 weeks ago) but it didn't work.. I don't know what exactly happened, but persistance pays after all  Thanks anyway
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 42
Posts: 5248
CMiYC
|
 |
« Reply #3 on: February 23, 2011, 02:53:38 pm » |
Try holding the processor in RESET until right before the IDE starts the upload.
To hold in Reset, press and hold the reset button before applying power. Do not release until about ~1 second after the "Sketch: XXX of XXXX bytes" message.
|
|
|
|
|
Logged
|
|
|
|
|
Lancashire, UK
Offline
Edison Member
Karma: 8
Posts: 1988
|
 |
« Reply #4 on: February 23, 2011, 03:49:47 pm » |
Sounds like the 8U2 firmware bug on the Uno/Mega2560. Upgrading the firmware will probably cure it if it is. http://arduino.cc/en/Hacking/DFUProgramming8U2This is the easy way of putting it in DFU mode : 
|
|
|
|
|
Logged
|
|
|
|
|
Greece
Offline
Newbie
Karma: 0
Posts: 13
Greek Tinker
|
 |
« Reply #5 on: February 23, 2011, 05:15:35 pm » |
Thanks Pluggy, I'll try updating the firmware, and post back the results
|
|
|
|
« Last Edit: February 23, 2011, 06:13:09 pm by Space_Tinkerer »
|
Logged
|
|
|
|
|
Greece
Offline
Newbie
Karma: 0
Posts: 13
Greek Tinker
|
 |
« Reply #6 on: March 01, 2011, 06:39:49 am » |
UPDATE -- I just updated the firmware, and now it works great! Pluggy your guide was great help. Maybe you should add the image to the official guide, because the description there is not very clear.
Anyway, I intentionally loaded the faulty program again, which prints to the serial port, and when I uploaded something else it worked right away. So bug fixed!
|
|
|
|
|
Logged
|
|
|
|
|
Lancashire, UK
Offline
Edison Member
Karma: 8
Posts: 1988
|
 |
« Reply #7 on: March 01, 2011, 10:56:49 am » |
We'll need Massimo or another admin to do that. Us mere mortals can't alter the main website.......
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Newbie
Karma: 0
Posts: 32
Confucius says: Arduino leads to happiness.
|
 |
« Reply #8 on: May 20, 2011, 12:00:05 am » |
I was having problems with my UNO and Ubuntu when using the serial communication. Pluggy's post and flashing the firmware solved my problem  Thank you!
|
|
|
|
|
Logged
|
|
|
|
|
CO, USA
Offline
God Member
Karma: 4
Posts: 710
|
 |
« Reply #9 on: May 21, 2011, 10:41:55 pm » |
Well, looks like I have to resort to this. Which is just as well, since my bootloader doesn't do the delay after reset to see if anything's coming in (and I seriously need this, as a n00b programmer). So, any reason to use Ada's bootloader instead of the latest from github?
|
|
|
|
|
Logged
|
... it is poor civic hygiene to install technologies that could someday facilitate a police state. -- Bruce Schneier
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 35
Arduino rocks
|
 |
« Reply #10 on: June 21, 2011, 03:00:02 pm » |
Hello pluggy, many thank's for your good picture. I'm using an mega2560 and have some trouble to upload some sketches to it. Now I wan't to test the 8U2 bugfix. But "the solder jumper on the back of the board (near the map of Italy)" are not present. In my opinion the solder jumpers below the 6 pin ICSP block are the right one on MEGA2560 boards ( http://arduino.cc/en/uploads/Main/ArduinoMega2650Back.jpg). Can anybody confirm this? Thanks in advance, Thomas
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 20
|
 |
« Reply #11 on: April 27, 2013, 05:05:27 pm » |
I am working with the UNO and am trying to reinstall my 8U2 firmware. I have followed all the above directions, and this is the error I am getting not...any ideas?? 
|
|
|
|
|
Logged
|
|
|
|
|
|