I have a button and when pressed, it should do a "mouse.click"
Accidentally I have written a code that clicks all the time so whenever I connect the arduino (micro) to computer, it keeps clicking and I cannot upload code again to the board because it clicks everywhere...
I have clicked the reset button on Arduino but it does not work. I does not delete the code inside...
So what should I do? I need help ASAP... Thanks...
The reset button does not delete the code, it's just like a reboot.
Keep the reset button pressed, then connect to the PC, Upload another sketch, release the reset button ~1-3s after clicking "upload".
You might need some tries, timing is a bit tricky, but it works.
Anyway, always program in a failsafe.
I don’t see a need for that. It’s hardly possible to accidentally write a sketch that keeps you from overwriting it. Also, if your sketch doesn’t do what you thought it would do, chances are the failsafe does not help.
We’re talking about an arduino sketch, not the Red Queen, lol