7804| 14
|
[求助] 通过蓝牙助手控制LED的亮灭的代码 |
hnyzcj 发表于 2015-8-12 17:41 void setup() { Serial.begin(115200); //initial the Serial } void loop() { if(Serial.available()) { Serial.write(Serial.read()); //send what has been received } } 不行啊!怎么回事? |
#include <Wire.h> #include <Intel_Edison_BT_SPP.h> Intel_Edison_BT_SPP spp = Intel_Edison_BT_SPP(); void setup() { Serial.begin(115200); Serial.println("Intel Edison BT SPP test!"); spp.open(); } void loop() { ssize_t size = spp.read(); if (size != -1) { Serial.println(spp.getBuf()); } else { // Well, some error here delay(500); } } 官方给的只能发数据给串口监视器,那怎么把Edison上的数据发给手机蓝牙助手? 链接地址 |
Cain 发表于 2015-8-13 10:29 好像没有,没找到样例 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed