My Arduino got damaged by a short circuit so I tried my board with a simple code it gives me wrong results, so is there any way to reset or format it?
Try the following:
- Prepare the basic empty program (empty setup, loop, etc.)
- Compile it.
- Reset the Arduino using the hardware button on the chip
- Press Ctrl + U to upload your code.
- 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.
I had a similar problem with my Arduino Nano 33 IoT, where I uploaded a program that immediately put it into sleep mode (completely unintentionally). I could not get the COM port to show, and consequently could not upload a corrective program. After scouring the internet, I found two methods to put the mode where you should be able to upload a basic program (such as an empty sketch or the Blink example).
- Double-tap the reset button. This will put the Arduino into a mode where the bootloader is waiting for an upload. You will know it is in this mode as you will see the LED do a slow 1 second fade on and off.
- Hard Reset. Plug the Arduino into the USB port. Then place a jumper between the Ground and the Reset pins. Finally hit the reset button. You should see the LED perform the same on and off slow-fade.
Unfortunately, neither of these methods worked for me. After a few hours of fiddling with it, I was ready to call it a brick, and return it the Arduino company to see if they could rescue it. However, just before I gave up on it, I had a flash of insight. I swapped my USB cable...and the port showed up just fine on the computer.
I'll leave this here in case anyone else has a similar problem.