Blynk Bluetooth Servo Sketch No device found

I copied the example code for the Bluetooth Servo using Hc-05. I downloaded the app on Android. The phone’s settings show the HC-05 is connected. I made a new project. Selected Uno board and bluetooth connection. I made a slider value 0-180 and set it as V3. Put in my auth code and everything. I do notice that the <BlynkSimpleSerialBLE.h> is not black rather than orange like the rest of the library names. The code uploaded to the board fine. When I click the play button on the app, I get told the device is offline. What am I doing wrong?

/*************************************************************
  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Blynk community:            http://community.blynk.cc
    Social networks:            http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example shows how to use Arduino with HC-06/HC-05
  Bluetooth 2.0 Serial Port Profile (SPP) module
  to connect your project to Blynk.

  Note: This only works on Android! iOS does not support SPP :(
        You may need to pair the module with your smartphone
        via Bluetooth settings. Default pairing password is 1234

  Feel free to apply it to any other example. It's simple!

  NOTE: Bluetooth support is in beta!

  Rotate a servo using a slider!

  App project setup:
    Slider widget (0...180) on V3
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
#include <Servo.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "e7c17d6a8ae446cab9975d01d35e46af";

SoftwareSerial SerialBLE(10, 11); // RX, TX

Servo servo;

BLYNK_WRITE(V3)
{
  servo.write(param.asInt());
}

void setup()
{
  // Debug console
  Serial.begin(9600);

  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

  Serial.println("Waiting for connections...");

  servo.attach(9);
}

void loop()
{
  Blynk.run();
}

Not posting your code would be the first thing. :wink:

```cpp
CODE
```

Code added. Sorry.

1 Like

What does your Serial output say?

[0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.4.4 on Arduino Uno

[5001] Connecting…
[10121] Connecting…
[15241] Connecting…
[17361] Login timeout
[20361] Connecting…
[22481] Login timeout
[25481] Connecting…
[27601] Login timeout
[30601] Connecting…
[32721] Login timeout
[35721] Connecting…
[40841] Connecting…

The login timeout comes randomly but also when I click the play button on the app.

@Gunner, you’re a BLE guy… any ideas?

Try deeper debugging.

#define BLYNK_DEBUG

http://docs.blynk.cc/#blynk-firmware-debugging-define-blynk_debug

I am fairly sure the HC-05 is standard Bluetooth, not BLE, but the basic principle should be the same.

Make sure your phone is paired with the module (you don’t seem to need to do this with BLE, but you do with basic BT) and then in your project you should be able to add the Bluetooth widget (if it says BT not available and won’t let you add it, then confirm that you are paired first)… Once added to your project, click on it and connect to the HC-05 module. It should remember this connection from now on.

If the Bluetooth gets disconnected, sometimes you will need to stop and play the project again to get it to reconnect to the BT module.