I have just got my first Arduino yesterday, it is an Arduino Nano 33 ble sense, It was working fine all of yesterday, and I used it with several simple circuits. This morning I plugged it in and tried to push code to the Arduino, when part way through pushing code an error popped up. Since this error popped up the Arduino IDE has the ports symbol greyed out, and in device manager the Arduino is nowhere to be found. I have tried using a different USB port on my pc nothing changed. When I plug the Arduino in the green led on it does still light up though. I would really appreciate any help anyone can provide me.
Extra info: When plugging in or pressing Arduino reset button the device manager refreshes, and my pc makes a usb plug in noise.
The tricky thing about the boards with native USB functionality like your Nano 33 BLE Sense is that the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the USB code, or stop it from running. When that happens, it no longer presents a port.
That makes it so you can't upload normally any more. However, the situation is really not so bad because there is an independent program called the bootloader in a separate section of memory from your sketch, and that program has its own USB CDC code. So even if the sketch is completely broken, you only need to activate the bootloader and you will get a port back and be able to upload.
Fortunately, there is an easy way to recover from this situation:
- Press and release the reset button on your board quickly twice. You should now see the LED on the board pulsing, which means the bootloader is running. The double press causes the bootloader to run indefinitely (until the board is reset, powered off, or an upload is done), which means you don't need to get the timing of the reset just right.
- Select the port of your board from the Tools > Port menu. The port number may be different when the bootloader is running so don't assume you already have the correct port selected.
- Start an upload in the Arduino IDE.
The upload should now finish successfully. After this, you should be able to go back to doing normal uploads without needing to press the reset button. If you still need to do the reset trick to do uploads after this, the problem may be caused by your code. You can verify this by uploading a simple sketch like File > Examples > 01.Basics > BareMinimum.
Thank you so much!
Worked exactly like you have described.
You're welcome. I'm glad to hear it's working now. Enjoy!