基本信息
[] 这个问题满足提问指南
[] 我阅读了开发文档
[] 我使用了最新的库及APP进行测试,但是问题仍然存在
[] 我搜索过类似问题的解决方法但是仍然无法解决
[x] 有设备端的LOG信息
[] 有编译报错信息
[] 我已填写基本信息
设备信息
硬件: [ESP-32S]
接入方式: [WIFI]
package版本: [esp32-1.0.4]
blinker库版本: [arduino 0.3.0]
开发环境: [Arduino]
操作系统: [Windows10 64bit]
IDE 中的设置
Module: [Nodemcu]
Reset Method: [nodemcu]
Flash Frequency: [40Mhz]
Upload Using: [SERIAL]
Upload Speed: [115200]
问题描述
编写桌面时钟时老是报错,尝试编译ESPTPOUCH的Demo时还是报错,错误类型几乎相同(已经重新下载过库)
代码
#define BLINKER_WIFI
#define BLINKER_ESP_SMARTCONFIG
#include <Blinker.h>
char auth[] = "6f4d****1a7e";
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
Blinker.vibrate();
uint32_t BlinkerTime = millis();
Blinker.print("millis", BlinkerTime);
}
void setup()
{
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
Blinker.begin(auth);
Blinker.attachData(dataRead);
}
void loop()
{
Blinker.run();
}
编译信息
Arduino:1.8.10 (Windows 10), 开发板:"NodeMCU-32S, 80MHz, 921600"
In file included from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:10:0,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:650:17: error: multi-line comment [-Werror=comment]
// BLINKER_ERR_LOG_ALL(BLINKER_F("No authority uuid, \
^
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:2636:9: error: multi-line comment [-Werror=comment]
// if (STRING_contains_string(data, "ssid") && \
^
In file included from I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:83:0,
from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:519:1: error: multi-line comment [-Werror=comment]
// BLINKER_LOG_ALL(BLINKER_F("autoFormatData key: "), key, \
^
In file included from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11:0,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:3225:53: error: multi-line comment [-Werror=comment]
if ((millis() - _initTime) >= 15000)// && \
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:3356:53: error: multi-line comment [-Werror=comment]
if ((millis() - _initTime) >= 15000)// && \
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:3550:53: error: multi-line comment [-Werror=comment]
if ((millis() - _initTime) >= 15000)// && \
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:5978:9: error: multi-line comment [-Werror=comment]
// BLINKER_LOG_ALL(BLINKER_F("num: "), _num, \
^
In file included from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:10:0,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'virtual char* BlinkerMQTT::lastRead()':
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:683:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'int BlinkerMQTT::connectServer()':
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1508:15: warning: unused variable 'httpsPort' [-Wunused-variable]
const int httpsPort = 443;
^
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'int BlinkerMQTT::isJson(const String&)':
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:2229:16: warning: variable 'root' set but not used [-Wunused-but-set-variable]
JsonObject root = jsonBuffer.as<JsonObject>();
^
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'void BlinkerMQTT::connectWiFi(const char*, const char*)':
I:\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:2751:14: warning: unused variable '_connectTime' [-Wunused-variable]
uint32_t _connectTime = millis();
^
In file included from I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:82:0,
from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApiBase.h: In member function 'char* BlinkerBridge_key::getName()':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApiBase.h:194:29: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "false";
^
In file included from I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:83:0,
from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::deviceName()':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:97:86: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char * deviceName() { if (isInit) return conn->deviceName(); else return ""; }
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::authKey()':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:98:83: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char * authKey() { if (isInit) return conn->authKey(); else return ""; }
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::dataParse()':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:234: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 I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11:0,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: At global scope:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:775:97: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
BlinkerWidgets_string _BUILTIN_SWITCH = BlinkerWidgets_string(BLINKER_CMD_BUILTIN_SWITCH);
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::bridgeKey(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6362:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::bridgeName(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6369:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "false";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_str(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6994:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_rgb(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7008:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_int(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7014:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_tab(uint8_t)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7020:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'void BlinkerApi::tabWidgetsParse(char*, const JsonObject&)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7331:21: warning: unused variable '_number' [-Wunused-variable]
uint8_t _number = 0;
^
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'String BlinkerApi::blinkerServer(uint8_t, const String&, bool)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10111:23: warning: unused variable 'httpsPort' [-Wunused-variable]
const int httpsPort = 443;
^
In file included from I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:83:0,
from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'int BlinkerProtocol::printNow()':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:316:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
In file included from I:\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11:0,
from I:\Arduino\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_703408\ESPTOUCH_WiFi.ino:49:
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'void BlinkerApi::numParse(const JsonObject&)':
I:\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:9875:37: error: array subscript is below array bounds [-Werror=array-bounds]
_Widgets_num[num]->setState(false);
^
cc1plus.exe: some warnings being treated as errors
"Ticker.h" 对应多个库
已使用: D:\Program
"EEPROM.h" 对应多个库
已使用: D:\Program
"Update.h" 对应多个库
已使用: D:\Program
"WebServer.h" 对应多个库
已使用: D:\Program
"SPIFFS.h" 对应多个库
已使用: D:\Program
"Blinker.h" 对应多个库
已使用: I:\Arduino\libraries\blinker-library-master
"ESPmDNS.h" 对应多个库
已使用: D:\Program
"WiFi.h" 对应多个库
已使用: D:\Program
未使用:D:\Program
"FS.h" 对应多个库
已使用: D:\Program
"HTTPClient.h" 对应多个库
已使用: D:\Program
"WiFiClientSecure.h" 对应多个库
已使用: D:\Program
exit status 1
为开发板 NodeMCU-32S 编译时出错。
|