Bluetooth time out option when start up Arduino

I’m doing an arduino project with HM-10, which it detects movements from ADXL345 and trigger speaker to make some sound, and listens to Blynk widgets(iOS) to trigger some other noise.

I’m wondering is there an option to not start up Blynk when it had been waiting to connect for a while, skip the set up and use my default setup so my code can start working in loop().

• Smartphone OS: iOS
• Blynk Library version: Newest

If you use Blynk.begin then it will block all processing until it connects. The alternative is Blynk.config and Blynk.connect, but I don’t know if these work with Bluetooth. Maybe a search will answer that question.


Thanks for fast reply, Pete. I discover that Blynk.config and Blynk.connect can’t be use in Bluetooth connection, it is for WiFi.

Here is part of my code:
/--------Blynk Bluetooth Settings-------/
Serial.println(“The code Stuck here when no connection”);
Blynk.begin(SerialBLE, auth);
Serial.println(“BlueTooth connected”);


The characters you’ve used at the beginning and end of your code are the wrong ones.
The correct characters are these:

Blynk.begin will always block code execution until a connection is established.


One other option is the work done by @khoih on amending the Blynk libraries to allow Wi-Fi and Bluetooth connections to be interchanged in the same sketch. Maybe take a look at that to see if it helps.