How to reset arduino without pc

when i plug my arduino leonardo it's spamming "c" i cant uplaod any codes how can i reset it? how can i reset its memory?

Disconnect the Leonardo from the PC.
2)
Open the blink sketch ( or something else that is innocent :wink: ).
3)
Connect the Leonardo to the PC while having the reset button on the Leonardo pressed.
4)
Start the upload of the sketch; still keeping the reset button pressed.
5)
When the IDE reports the memory usage, release the reset button.

That should do the trick.

Advise:
add a safe guard in your Arduino code; the basics below

const byte safePin = A0;

void setup()
{
  pinMode(safePin, INPUT_PULLUP);
}

void loop()
{
  // only if the safety pin is LOW
  if(digitalRead(safePin) == LOW)
  {
    // send keystrokes
  }
}

Use a wire or button to pull the safe pin low. If you want the upload, disconnect the wire and 'spamming' will stop.

(deleted)

spycatcher2k:
or double tap the reset button to put it into uplad mode.

I think that it is more about preventing the PC / IDE being spammed so you can load a sketch than to get into reset mode. 8 seconds is probably a bit short to do things.

My approach was slightly more complicated than necessary. Step (3) could be omitted if step (1) was "press the reset button and keep it pressed".

Question: I thought that double tapping was for the Sparkfun pro micro; does double tapping also work on a Leonardo? Not one at hand to test.

sterretje:
1)
Disconnect the Leonardo from the PC.
2)
Open the blink sketch ( or something else that is innocent :wink: ).
3)
Connect the Leonardo to the PC while having the reset button on the Leonardo pressed.
4)
Start the upload of the sketch; still keeping the reset button pressed.
5)
When the IDE reports the memory usage, release the reset button.

That should do the trick.

Advise:
add a safe guard in your Arduino code; the basics below

const byte safePin = A0;

thank you man