0

I have made a code using involving HID control. But it seems that I messed up, but I can't upload a new sketch(nor edit the wrong code), because my Arduino is constantly doing things like Ctrl+Alt+Delete, Alt+F4... etc. It seems that the only way is erasing the code in the memory, but how can I do so?

asked Nov 12, 2019 at 15:18
1
  • Use a hardware programmer (USBASP, etc, or an Arduino as an ISP). Commented Nov 12, 2019 at 15:22

1 Answer 1

1
  1. Do the "button dance" - hold the Arduino in reset, releasing just you see the download start in the IDE. This may (will!) take a little practice to get just the right timing.

or

  1. Use an external programmer connected to the ICSP connector. This could be a commercially made one, a DIY, or another Uno programmed and connected as an ICSP programmer. How-to's abound on the web.
answered Nov 12, 2019 at 15:29
1
  • You can't do the "Button dance" on the Leonardo. Holding it in reset will not give you a serial port to start the upload to. Depending on the bootloader version you may get a few seconds after releasing the reset where it presents a COM port before the sketch runs (good luck on Windows - it may take too long to enumerate...), or pressing reset twice rapidly may put it in the bootloader. Best to have a programmer on hand anyway though as a general rule regardless. Commented Nov 12, 2019 at 22:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.