I apologize, I don’t know where I got that code. The code I meant to had trouble with is below, with the serial monitor following. The issue is that I upload this code to an arduino UNO connected to an HM-10, and when I try and connect it to my Samsung S9, HMSoft appears as an option, I select it, and then my phone, in the Blynk app, displays “Connecting…” indefinitely. It is possible that I did not download the libraries correctly, but I am fairly certain this is not the issue.
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
SoftwareSerial SerialBLE(10, 11); // RX, TX
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
}
void loop()
{
Blynk.run();
// 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!
}
[0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.0 on Arduino Uno
[89] Connecting...
[3229] Login timeout
[5229] Connecting...
[5348] Packet too big: 17231
[10349] Connecting...
[10468] Packet too big: 25394
[10469] Packet too big: 12646
[10470] Packet too big: 13367
[10499] Packet too big: 12390
[10530] Packet too big: 25904
[10563] Packet too big: 14434
[15469] Connecting...
[15588] Packet too big: 19535
[20589] Connecting...
[23709] Login timeout
I think @Arduinio was saying that he installed the Blynk v6.0.1 library, as reccomended by @Gunner, to the Arduino IDE; but be did it using the “add .zip library” option, which isn’t the recommended way to install the Blynk libraries.
“Add .zip library” is the IDE automated routine, manually installing the library is the preferred method…
How to install Blynk library.
Blynk library should be installed manually
Follow the instructions:
Download Blynk_Release_vXX.zip (scroll down to the Downloads section)
Unzip the archive. You will notice that archive contains several folders and several libraries.
Copy all of these libraries to your_sketchbook_folder of Arduino IDE. To find the location of your_sketchbook_folder, go to top menu in Arduino IDE:
Windows: File → Preferences
Mac OS: Arduino → Preferences
The structure of your your_sketchbook_folder should now look like this, (along with your other sketches if you have them):