I picked an example on the Blynk sketch generator : https://examples.blynk.cc/?board=Arduino%20Uno&shield=HC05%20or%20HC06&example=GettingStarted%2FBlynkBlink
I was not able to compile it, so I change the Software serial declaration (SwSerial==> SerialBLE)
II created a Blynk app with a bluetooth widget, and pairing my galaxy tab with the HC-05. But when I launch the programme I have :
- On Arduino side, it seem to be not connected :
- On Blynk side, when I try to connect Bluetootth device, I have this message : “can’t connect. Retry or choose another device”
Currently, I use
- a Galaxy tab S2 with Android 7.0
- HC-05(Baudrate set at 9600)
- Arduino UNO (IDE : 1.8.12, Blynk : v0.6.1)
Do you know why it’s not possible to connect my device? I tried to find my answer on previous topics but without success
Here below my code :
#define BLYNK_PRINT Serial
SoftwareSerial SerialBLE(10, 11); // RX, TX
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth = “vTr3KNk3-N2GX5rORsDbu_bJTTfjbata”;
// Debug console
Serial.println(“Waiting for connections…”);
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!