Hi. I am new to Blynk and relatively new to Arduino.
I and using your basic BLE sketch with an added function of digital write to pin 38. My problem is that my BLE doesn’t always connect to the Blynk app and the Arduino sketch will not run until it connects. I am worried as in case of a power cut, if the bluetooth connection is not automatically reconnected, the Arduino will not start running the code and will not do what its supposed to.
#define BLYNK_PRINT Serial
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
char auth[] = "*************************************4854b";
void setup()
{
Serial.begin(9600);
pinMode(38, OUTPUT);
Serial1.begin(9600); // via BT Module
Blynk.begin(Serial1, auth); // Connect to App via BT
Serial.println("Waiting for connections...");
}
void loop()
{
Blynk.run();
digitalWrite(38, LOW);
}