谁能帮我看看这个主要是错在那里了···
是文件放在桌面的原因?
Arduino:1.8.12 (Windows 10), 开发板:"Arduino Uno"
time:40:21: error: variable 'ntpServer' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
const PROGMEM char *ntpServer = "ntp.aliyun.com";
^~~~~~~~~
In file included from C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:96:0,
from C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/BlinkerSerialESPMQTT.h:5,
from C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker.h:46,
from C:\Users\Administrator\Desktop\time\time.ino:46:
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::dataParse()':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerProtocol.h:257:86: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* dataParse() { if (canParse) return conn->lastRead(); else return ""; }
^~
In file included from C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/BlinkerSerialESPMQTT.h:5:0,
from C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker.h:46,
from C:\Users\Administrator\Desktop\time\time.ino:46:
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: At global scope:
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:850:97: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
BlinkerWidgets_string _BUILTIN_SWITCH = BlinkerWidgets_string(BLINKER_CMD_BUILTIN_SWITCH);
^
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_str(uint8_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:8077:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_joy(uint8_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:8084:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_rgb(uint8_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:8091:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_int(uint8_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:8097:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_tab(uint8_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:8103:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\Administrator\Desktop\time\time.ino: At global scope:
time:258:1: error: 'ICACHE_RAM_ATTRvoid' does not name a type
ICACHE_RAM_ATTR void attachInterrupt_fun_5() {
^~~~~~~~~~~~~~~~~~~
time:488:1: error: 'ICACHE_RAM_ATTRvoid' does not name a type
ICACHE_RAM_ATTR void attachInterrupt_fun_4() {
^~~~~~~~~~~~~~~~~~~
time:258:1: error: 'ICACHE_RAM_ATTR' does not name a type
ICACHE_RAM_ATTR void attachInterrupt_fun_5() {
^~~~~~~~~~~~~~~
C:\Users\Administrator\Desktop\time\time.ino: In function 'void getntime()':
time:310:7: error: 'WiFi' was not declared in this scope
if (WiFi.status()) {
^~~~
C:\Users\Administrator\Desktop\time\time.ino: At global scope:
time:488:1: error: 'ICACHE_RAM_ATTR' does not name a type
ICACHE_RAM_ATTR void attachInterrupt_fun_4() {
^~~~~~~~~~~~~~~
C:\Users\Administrator\Desktop\time\time.ino: In function 'void loop()':
time:577:44: error: 'attachInterrupt_fun_5' was not declared in this scope
attachInterrupt(digitalPinToInterrupt(5),attachInterrupt_fun_5,RISING);
^~~~~~~~~~~~~~~~~~~~~
C:\Users\Administrator\Desktop\time\time.ino:577:44: note: suggested alternative: 'attachInterrupt'
attachInterrupt(digitalPinToInterrupt(5),attachInterrupt_fun_5,RISING);
^~~~~~~~~~~~~~~~~~~~~
attachInterrupt
time:584:44: error: 'attachInterrupt_fun_4' was not declared in this scope
attachInterrupt(digitalPinToInterrupt(4),attachInterrupt_fun_4,RISING);
^~~~~~~~~~~~~~~~~~~~~
C:\Users\Administrator\Desktop\time\time.ino:584:44: note: suggested alternative: 'attachInterrupt'
attachInterrupt(digitalPinToInterrupt(4),attachInterrupt_fun_4,RISING);
^~~~~~~~~~~~~~~~~~~~~
attachInterrupt
exit status 1
variable 'ntpServer' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
|