Unable to get Arduino Nano 33 BLE to receive sketch

I am struggling to upload sketches to my Arduino nano 33 Ble.

When I first got the board it worked okay. It established com 3 and com 4. When I plug it in it reflects on com 3. When I click upload it says board not found and then the board reflects on com 4. Uploading again would then switch the board back to com 3 but the upload would be successful. Essentially every time I wanted to upload a sketch, I had to upload it twice. Any solution to this?

Currently, the board won’t accent any sketches. It comes with the “openPort(); Exception type - Port busy.” error and it doesn’t upload and switches the board to com 3. It then does the same thing with com 3.

I have tried the solution of double-clicking the reset button to enter bootloader mode as described in the forum post: https://forum.arduino.cc/index.php?topic=630864.0

This does not solve any problems and I still get the “port busy” error. I am also unable to open the serial monitor and the “port busy” error is again shown.

I have attached the last sketch that was uploaded.

Version_2.ino (4.49 KB)

Hello and welcome to the forum!

As it is your first post, I would kindly recommend that you learn how to use the forum and paste your code in code tags ( </> ). Thanks!