esp8266连接错误
Arduino:1.8.7 (Windows 10), 开发板:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (1M SPIFFS)"In file included from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/BlinkerESPMQTT.h:10:0,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\85988\Desktop\arduino鏁欑▼\arduino绋嬪簭\WiFi鐏痋Hello_WiFi\Hello_WiFi.ino:3:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:220:5: error: 'BearSSL' does not name a type
BearSSL::WiFiClientSecure client_mqtt;
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'virtual int BlinkerMQTT::connect()':
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:334:9: error: 'client_mqtt' was not declared in this scope
client_mqtt.setInsecure();
^
In file included from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/BlinkerESPMQTT.h:10:0,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\85988\Desktop\arduino鏁欑▼\arduino绋嬪簭\WiFi鐏痋Hello_WiFi\Hello_WiFi.ino:3:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h: In member function 'int BlinkerMQTT::connectServer()':
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1623:5: error: 'client_mqtt' was not declared in this scope
client_mqtt.stop();
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1625:21: error: 'BearSSL' was not declared in this scope
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1625:46: error: template argument 1 is invalid
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1625:46: error: template argument 2 is invalid
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1625:55: error: invalid type in declaration before '(' token
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1625:60: error: expected type-specifier before 'BearSSL'
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1628:13: error: base operand of '->' is not a pointer
client_s->setInsecure();
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Adapters/BlinkerMQTT.h:1644:21: error: invalid type argument of unary '*' (have 'int')
if (http.begin(*client_s, url_iot)) {// HTTPS
^
In file included from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:45:0,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\85988\Desktop\arduino鏁欑▼\arduino绋嬪簭\WiFi鐏痋Hello_WiFi\Hello_WiFi.ino:3:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h: At global scope:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h:13:12: error: 'BearSSL' does not name a type
extern BearSSL::WiFiClientSecure client_mqtt;
^
In file included from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:45:0,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\85988\Desktop\arduino鏁欑▼\arduino绋嬪簭\WiFi鐏痋Hello_WiFi\Hello_WiFi.ino:3:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h: In member function 'bool BlinkerOTA::update()':
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h:122:5: error: 'BearSSL' has not been declared
BearSSL::WiFiClientSecure client_s;
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h:122:31: error: expected ';' before 'client_s'
BearSSL::WiFiClientSecure client_s;
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h:126:5: error: 'client_mqtt' was not declared in this scope
client_mqtt.stop();
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/../Functions/BlinkerOTA.h:129:17: error: 'client_s' was not declared in this scope
bool mfln = client_s.probeMaxFragmentLength(ota_host, ota_port, 1024);
^
In file included from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/BlinkerESPMQTT.h:11:0,
from C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker.h:36,
from C:\Users\85988\Desktop\arduino鏁欑▼\arduino绋嬪簭\WiFi鐏痋Hello_WiFi\Hello_WiFi.ino:3:
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'String BlinkerApi::blinkerServer(uint8_t, const String&, bool)':
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10444:20: error: 'BearSSL' does not name a type
extern BearSSL::WiFiClientSecure client_mqtt;
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10445:13: error: 'client_mqtt' was not declared in this scope
client_mqtt.stop();
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10447:29: error: 'BearSSL' was not declared in this scope
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10447:54: error: template argument 1 is invalid
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10447:54: error: template argument 2 is invalid
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10447:63: error: invalid type in declaration before '(' token
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10447:68: error: expected type-specifier before 'BearSSL'
std::unique_ptr<BearSSL::WiFiClientSecure>client_s(new BearSSL::WiFiClientSecure);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10450:21: error: base operand of '->' is not a pointer
client_s->setInsecure();
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10474:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10487:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10501:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10516:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10529:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10542:37: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10557:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10571:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10584:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10596:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10610:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10623:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10636:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10649:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10661:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10675:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10688:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10701:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10714:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10726:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10739:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10752:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
C:\Users\85988\AppData\Local\Arduino15\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:10766:41: error: invalid type argument of unary '*' (have 'int')
http.begin(*client_s, url_iot);
^
exit status 1
为开发板 NodeMCU 1.0 (ESP-12E Module) 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
程序
//13=D7 16=D0 15=D8 14=D5 12=D6 4=D2 3=D9 2=D4 1=D10 0-D3//
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "006bef2727ec";
char ssid[] = "住进深海里";
char pswd[] = "741852963";
// 新建组件对象
BlinkerButton Button1("btn-abc");
BlinkerNumber Number1("num-abc");
int counter = 0;
// 按下按键即会执行该函数
void button1_callback(const String & state)
{
BLINKER_LOG("get button state: ", state);
digitalWrite(13, !digitalRead(13));
}
// 如果未绑定的组件被触发,则会执行其中内容
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
counter++;
Number1.print(counter);
}
void setup()
{
// 初始化串口
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
// 初始化有LED的IO
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
// 初始化blinker
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
Button1.attach(button1_callback);
}
void loop() {
Blinker.run();
}
更新package
页:
[1]