Blinker的示例Ticker_BLE编译出错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1753|回复: 2

[已解答] Blinker的示例Ticker_BLE编译出错

[复制链接]
发表于 2021-4-6 22:08 | 显示全部楼层 |阅读模式
本帖最后由 hodrag 于 2021-4-6 22:39 编辑

我用的Arduino1.8.13+blinker0.3.6,在编译示例时出现错误:
  1. In file included from G:\arduino\portable\sketchbook\libraries\Blinker\src/Blinker.h:21:0,
  2.                  from G:\arduino\portable\sketchbook\libraries\Blinker\examples\Blinker_Ticker\Ticker_BLE\Ticker_BLE.ino:48:
  3. G:\arduino\portable\sketchbook\libraries\Blinker\src/BlinkerSerialBLE.h: In member function 'void BlinkerSerialBLE::begin(uint8_t, uint8_t, uint32_t)':
  4. G:\arduino\portable\sketchbook\libraries\Blinker\src/BlinkerSerialBLE.h:93:30: error: 'RX' was not declared in this scope
  5.              if (ss_rx_pin == RX && ss_tx_pin == TX) {
  6.                               ^
  7. G:\arduino\portable\sketchbook\libraries\Blinker\src/BlinkerSerialBLE.h:93:49: error: 'TX' was not declared in this scope
  8.              if (ss_rx_pin == RX && ss_tx_pin == TX) {
  9.                                                  ^
  10. G:\arduino\portable\sketchbook\libraries\Blinker\examples\Blinker_Ticker\Ticker_BLE\Ticker_BLE.ino: At global scope:
  11. Ticker_BLE:53:1: error: 'BlinkerTicker' does not name a type
  12. BlinkerTicker ticker;
  13. ^
  14. G:\arduino\portable\sketchbook\libraries\Blinker\examples\Blinker_Ticker\Ticker_BLE\Ticker_BLE.ino: In function 'void setup()':
  15. Ticker_BLE:88:5: error: 'ticker' was not declared in this scope
  16.      ticker.attach(30, ticker_callback);
  17.      ^
  18. G:\arduino\portable\sketchbook\libraries\Blinker\examples\Blinker_Ticker\Ticker_BLE\Ticker_BLE.ino: In function 'void loop()':
  19. Ticker_BLE:95:5: error: 'ticker' was not declared in this scope
  20.      ticker.run();
  21.      ^
  22. exit status 1
  23. 'BlinkerTicker' does not name a type
复制代码




发表于 2021-4-7 19:11 | 显示全部楼层
这个示例是给avr用的,你没有选择对应的硬件所以编译报错
 楼主| 发表于 2021-4-9 22:30 | 显示全部楼层
coloz 发表于 2021-4-7 19:11
这个示例是给avr用的,你没有选择对应的硬件所以编译报错

谢谢,明白了,8266得用ticker库
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 13:53 , Processed in 0.097553 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表