Human Cyborg Relations
Human Cyborg Relations

Reputation: 1244

Can't connect Arduino Uno to Blynk via Bluetooth

I have the HC-06 bluetooth hardware device set up with my Arduino UNO.

The RX on the Arduino is connected to the TX on the HC-06, and vice versa. They share a common 5V and GND.

I'm trying to connect to Blynk. I've got the Blynk widget set up on my Android phone (Motorola Nexus 6), and it detects the HC-06 and connects to it (stable LED on HC-06).

Here's the code I uploaded to the Arduino:

#define BLYNK_USE_DIRECT_CONNECT
#define BLYNK_PRINT Serial


// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <BlynkSimpleSerialBLE.h>

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

void setup()
{
  // Blynk will work through Serial
  // 9600 is for HC-06. For HC-05 default speed is 38400
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Serial.println("Setting up");
  Blynk.begin(Serial, auth);

  // It never gets here
  Serial.println("Connected");
}

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

Here's what I see on the Serial monitor:

Setting up
[0] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.4.7 on Arduino Uno

[95] Connecting...
[6094] Connecting...
[12094] Connecting...
[18094] Connecting...
[24094] Connecting...
[30094] Connecting...

And it just goes on. What am I doing wrong? I've been at it for hours now.

Upvotes: 1

Views: 1706

Answers (1)

user3768771
user3768771

Reputation: 46

HC-06 is not a BLE device, it is based on BC04 chip and supports Bluetooth 2.1

Upvotes: 1

Related Questions