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();
}