Hi Blynk Community,
i just did my first Projekt using Blynk and itś working great sending data from an arduino via ht05 Bluetooth module to the app.
My Issue:
Using the “Push Data” example i would like to start my code without establishing a Bluetooth connection on first boot.
I tried adding Blynk.disconnect() with no luck, but also not sure if this is suitable for BT connections…
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
char auth[] = "YourAuthToken";
SoftwareSerial SerialBLE(10, 11); // RX, TX
BlynkTimer timer;
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V5, millis() / 1000);
}
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
//>>>>>>> Stuck here forever without BT connection <<<<<<<<<<
//Blynk.disconnect() >>>>> not working
Serial.println("Waiting for connections...");
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.run(); // Initiates BlynkTimer
}
Thanks a lot for your help!
Tonkenplonk