首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法通过蓝牙将Arduino Uno连接到Blynk

无法通过蓝牙将Arduino Uno连接到Blynk
EN

Stack Overflow用户
提问于 2017-04-28 00:53:41
回答 1查看 1.6K关注 0票数 1

我用我的Arduino UNO安装了HC-06蓝牙硬件设备。

Arduino上的RX与HC-06上的TX连接,反之亦然.它们共有5V和GND。

我想和Blynk取得联系。我已经在我的Android手机上安装了Blynk小部件(摩托罗拉Nexus 6),它检测HC-06并连接到它(HC-06上稳定的LED )。

下面是我上传到Arduino的代码:

代码语言:javascript
复制
#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();
}

下面是我在串行监视器上看到的内容:

代码语言:javascript
复制
Setting up
[0] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.4.7 on Arduino Uno

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

就这样继续下去。我做错了什么?我已经干了好几个小时了。

EN

回答 1

Stack Overflow用户

发布于 2017-10-26 05:05:21

HC-06不是一种无刷电子设备,它基于BC04芯片,支持蓝牙2.1

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43670223

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档