esp8266上传失败-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 545|回复: 0

[未解决] esp8266上传失败

[复制链接]
发表于 2021-12-26 09:29 | 显示全部楼层 |阅读模式
程序:
  1. #define BLINKER_WIFI

  2. #include <Blinker.h>

  3. char auth[] = "765741573c43";
  4. char ssid[] = "CMCC-eu29";
  5. char pswd[] = "eu425t29";

  6. // 新建组件对象
  7. BlinkerButton Button1("btn-abc");

  8. // 按下按键即会执行该函数
  9. void button1_callback(const String & state) {
  10.     BLINKER_LOG("get button state: ", state);
  11.     digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  12.     Blinker.vibrate();
  13. }

  14. void setup() {
  15.     // 初始化串口,并开启调试信息
  16.     Serial.begin(115200);   
  17.     BLINKER_DEBUG.stream(Serial);
  18.     // 初始化有LED的IO
  19.     pinMode(6, OUTPUT);
  20.     digitalWrite(6, HIGH);
  21.     // 初始化blinker
  22.     Blinker.begin(auth, ssid, pswd);
  23.     Button1.attach(button1_callback);
  24. }

  25. void loop() {
  26.     Blinker.run();
  27. }
复制代码

报错信息:[md]C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src\modules\WebSockets\WebSocketsClient.cpp: In member function 'void WebSocketsClient::loop()':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:174:30: error: 'class BearSSL::WiFiClientSecure' has no member named 'setCACert'
  174 |                 _client.ssl->setCACert((const uint8_t *)_CA_cert, strlen(_CA_cert) + 1);
      |                              ^~~~~~~~~
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src\modules\WebSockets\WebSocketsClient.cpp: In member function 'void WebSocketsClient::connectedCb()':
C:\Users\Administrator\Documents\Arduino\libraries\Blinker\src\modules\WebSockets\WebSocketsClient.cpp:761:26: error: 'class BearSSL::WiFiClientSecure' has no member named 'verify'
  761 |         if(!_client.ssl->verify(_fingerprint.c_str(), _host.c_str())) {
      |                          ^~~~~~
"WiFiUdp.h" 对应多个库
已使用: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi
未使用:G:\Program Files\arduino-1.8.16\libraries\WiFi
exit status 1
为开发板 NodeMCU 1.0 (ESP-12E Module) 编译时出错。[/md]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-28 17:39 , Processed in 0.093975 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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