'PW' was not declared in this scope怎么解决-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2457|回复: 3

[未解决] 'PW' was not declared in this scope怎么解决

[复制链接]
发表于 2021-6-5 15:59 | 显示全部楼层 |阅读模式

出错

出错

出这种报错怎么解决
Arduino:1.8.9 (Windows 10), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

D:\程序\_______\_______.ino: In function 'void miotPowerState(const String&)':

_______:30:22: error: 'PW' was not declared in this scope

_______:35:9: error: 'BlinkerAliGenie' was not declared in this scope

_______:41:22: error: 'PW' was not declared in this scope

_______:46:9: error: 'BlinkerAliGenie' was not declared in this scope

D:\程序\_______\_______.ino: In function 'void miotQuery(int32_t)':

_______:22:12: error: 'D5' was not declared in this scope

D:\程序\_______\_______.ino:58:28: note: in expansion of macro 'PM'

_______:59:13: error: 'BlinkerAliGenie' was not declared in this scope

_______:62:13: error: 'BlinkerAliGenie' was not declared in this scope

_______:65:13: error: 'BlinkerAliGenie' was not declared in this scope

D:\程序\_______\_______.ino: In function 'void button1_callback(const String&)':

_______:84:18: error: 'PW' was not declared in this scope

D:\程序\_______\_______.ino: In function 'void heartbeat()':

_______:22:12: error: 'D5' was not declared in this scope

D:\程序\_______\_______.ino:90:20: note: in expansion of macro 'PM'

D:\程序\_______\_______.ino: In function 'void setup()':

_______:22:12: error: 'D5' was not declared in this scope

D:\程序\_______\_______.ino:102:13: note: in expansion of macro 'PM'

_______:108:13: error: 'PW' was not declared in this scope

D:\程序\_______\_______.ino: In function 'void loop()':

_______:22:12: error: 'D5' was not declared in this scope

D:\程序\_______\_______.ino:124:25: note: in expansion of macro 'PM'

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

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


发表于 2021-6-5 17:47 | 显示全部楼层
PW  有没有定义端口号

#define PW  0  //把0替换成你需要的端口号
 楼主| 发表于 2021-6-5 18:48 | 显示全部楼层
ahua7336 发表于 2021-6-5 17:47
PW  有没有定义端口号

#define PW  0  //把0替换成你需要的端口号

谢谢,兄弟
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-29 05:31 , Processed in 0.078688 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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