blinker双色温吸顶灯示例-Arduino中文社区 - Powered by Discuz! Archiver

17585229862 发表于 2022-8-21 12:58

你好:我是一个新手程序刷进去有几行报错,您能帮我看下吗

17585229862 发表于 2022-8-21 12:59

____:1:1: error: expected unqualified-id before '[' token
    1 |
      | ^
/Users/wangtao/Documents/Arduino/libraries/blinker-library-0.3.7/src/Blinker/BlinkerApi.h: In member function 'void BlinkerApi::buttonInit(int)':
____:8:28: error: 'D7' was not declared in this scope
    8 | #define BLINKER_BUTTON_PIN D7
      |                            ^~
/Users/wangtao/Documents/Arduino/libraries/blinker-library-0.3.7/src/Blinker/BlinkerApi.h:2778:24: note: in expansion of macro 'BLINKER_BUTTON_PIN'
2778 |               _pin = BLINKER_BUTTON_PIN;
      |                        ^~~~~~~~~~~~~~~~~~
/Users/wangtao/Documents/Arduino/____/____.ino: In function 'void setup()':
____:8:28: error: 'D7' was not declared in this scope
    8 | #define BLINKER_BUTTON_PIN D7
      |                            ^~
/Users/wangtao/Documents/Arduino/____/____.ino:159:19: note: in expansion of macro 'BLINKER_BUTTON_PIN'
159 |   attachInterrupt(BLINKER_BUTTON_PIN, buttonTick, CHANGE);
      |                   ^~~~~~~~~~~~~~~~~~
/Users/wangtao/Documents/Arduino/____/____.ino: At global scope:
____:167:1: error: expected unqualified-id before '[' token
167 |
      | ^
"WiFiUdp.h" 对应多个库
已使用: /Users/wangtao/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi
未使用:/Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
expected unqualified-id before '[' token

奈何col 发表于 2022-8-21 23:18

17585229862 发表于 2022-8-21 12:59
____:1:1: error: expected unqualified-id before '[' token
    1 |
      | ...

error: 'D7' was not declared in this scope
没有定义这个引脚,请直接使用GPIO编号
这里有说明:
https://www.arduino.cn/thread-108137-1-1.html

17585229862 发表于 2022-8-28 23:02

楼主,我直接写入您的程序的话,在点灯app中一直卡在设备注册,配置失败,我想问一下是key不可用了吗
页: 1 [2]
查看完整版本: blinker双色温吸顶灯示例