编译出错,请指教'BLINKER_LOG2' was not declared in this scope-Arduino中文社区 - Powered by Discuz! Archiver

bluetasle 发表于 2018-12-1 00:48

编译出错,请指教'BLINKER_LOG2' was not declared in this scope

新手,请指教是什么问题。
win10 64
arduino 1.8.5 和 1.8.7
mega 2560
JDY08 BLE

编译出错



代码是blinker文档完整示例程序
https://doc.blinker.app/?file=001-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/01-arduino%E8%93%9D%E7%89%99%E6%8E%A5%E5%85%A5
库文件是中文社区blinker版面置顶中下载
https://github.com/blinker-iot/blinker-library

Arduino:1.8.7 (Windows 10), 开发板:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

D:\ble\ble.ino: In function 'void button1_callback(const String&)':

ble:14:45: error: 'BLINKER_LOG2' was not declared in this scope

   BLINKER_LOG2("get button state: ", state);

                                             ^

D:\ble\ble.ino: In function 'void loop()':

ble:33:56: error: 'class BlinkerSerialBLE' has no member named 'readString'

         BLINKER_LOG2("Blinker.readString(): ", Blinker.readString());

                                                      ^

ble:33:68: error: 'BLINKER_LOG2' was not declared in this scope

         BLINKER_LOG2("Blinker.readString(): ", Blinker.readString());

                                                                  ^

exit status 1
'BLINKER_LOG2' was not declared in this scope

在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。


奈何col 发表于 2018-12-1 01:18

貌似库更新了,例程还没更新,等我同事明天更新下

三水 发表于 2018-12-1 10:14

直接使用BLINKER_LOG即可

三水 发表于 2018-12-1 14:25

https://doc.blinker.app/?file=001-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/01-arduino%E8%93%9D%E7%89%99%E6%8E%A5%E5%85%A5

BLE接入对应例程在文档中已更新,建议直接使用库自带的例程,库自带例程均为最新例程

bluetasle 发表于 2018-12-1 23:00

三水 发表于 2018-12-1 14:25
https://doc.blinker.app/?file=001-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/01-arduino%E8%93%9D%E7%89%99% ...

感谢指引我这迷途羔羊

ar123456ar 发表于 2019-5-15 20:24

三水 发表于 2018-12-1 14:25
https://doc.blinker.app/?file=001-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/01-arduino%E8%93%9D%E7%89%99% ...

'class BlinkerSerialBLE' has no member named 'readString'
大佬,麻烦你看下这个错误怎么解决,谢谢了

三水 发表于 2019-5-16 14:49

ar123456ar 发表于 2019-5-15 20:24
'class BlinkerSerialBLE' has no member named 'readString'
大佬,麻烦你看下这个错误怎么解决,谢谢了 ...

自己看文档
页: [1]
查看完整版本: 编译出错,请指教'BLINKER_LOG2' was not declared in this scope