How can I "reset" an Arduino board?

dugres picture dugres · Mar 13, 2011 · Viewed 239.3k times · Source

I've uploaded a sketch to an Arduino Uno whose loop is something like this:

void loop(){
    Serial.println("Hello, World!");
}

So, now, I can't upload anything anymore, because the IDE says "port already in use".

Is there a way to "reset" the Arduino without another programmer?

Nothing else is using the serial port, and everything went just fine until I uploaded the previous sketch.

I've found some interesting things:

Answer

Valed picture Valed · May 22, 2011

Try the following:

  1. Prepare the basic empty program (empty setup, loop, etc.)
  2. Compile it.
  3. Reset the Arduino using the hardware button on the chip
  4. Press Ctrl + U to upload your code.
  5. If unsuccessful - got to 3.

There is a delay before the boot loader starts the programs, just work on your timing. It worked for me when a bug in my Arduino's code was executing a soft reset every 500 ms.