How to Initialize Nano BLE 33 without Serial Monitor

Hello.
I am doing the following basic tutorial - it makes the LED go on/off over BT.
https://docs.arduino.cc/tutorials/nano-33-ble/bluetooth/

I'm using a Nano BLE 33 with the locally installed Arduino IDE 2.2.1.

It all works fine in the IDE but when I want to power my arduino from external stand alone power the code won't initiialize and run.
In the trouble shooting section on the page it says " * We haven't opened the Serial Monitor to initialize the program."
I can test this by closing the Serial Monitor and starting the Nano - I can't see the board on my phone. When I open the Serial Monitor I can see the Nano on my phone within about 1 second.
Of course in the real world we can't be keeping the IDE connected to the board, we want it to run autonomously on external power. How do I do that?

I found the solution over here https://forum.arduino.cc/t/question-about-nano-ble-searching-without-arduino-ide/680435/2

I needed to comment out the While(!Serial);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.