当前位置: 代码迷 >> 综合 >> arduino+esp8266在Blinker中遇到的问题
  详细解决方案

arduino+esp8266在Blinker中遇到的问题

热度:48   发布时间:2023-12-05 15:32:38.0

0.按照官方文档搭建好开发环境

参考链接:https://www.arduino.cn/thread-83174-1-1.html

1.编译Blinker下的hello_wifi示例程序出错

Arduino:1.6.12 (Windows 10), 开发板:"Arduino/Genuino Uno"In file included from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker.h:132:0,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\examples\Blinker_Hello\Hello_WiFi\Hello_WiFi.ino:40:E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:147:27: error: cannot declare field 'BlinkerSerialESPMQTT::Transp' to be of abstract type 'BlinkerSerialMQTT'BlinkerSerialMQTT Transp;^In file included from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:4:0,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker.h:132,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\examples\Blinker_Hello\Hello_WiFi\Hello_WiFi.ino:40:E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Adapters/BlinkerSerialMQTT.h:26:7: note:   because the following virtual functions are pure within 'BlinkerSerialMQTT':class BlinkerSerialMQTT : public BlinkerStream^In file included from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Adapters/BlinkerSerialMQTT.h:13:0,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/BlinkerSerialESPMQTT.h:4,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker.h:132,from E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\examples\Blinker_Hello\Hello_WiFi\Hello_WiFi.ino:40:E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker/BlinkerStream.h:34:25: note: 	virtual int BlinkerStream::bPrint(char*, const String&)virtual int bPrint(char * name, const String & data) = 0;^E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker/BlinkerStream.h:35:25: note: 	virtual int BlinkerStream::autoPrint(uint32_t)virtual int autoPrint(uint32_t id) = 0;^E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker/BlinkerStream.h:37:25: note: 	virtual int BlinkerStream::aligenieAvail()virtual int aligenieAvail() = 0;^E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker/BlinkerStream.h:38:25: note: 	virtual int BlinkerStream::duerAvail()virtual int duerAvail() = 0;^E:\soft\arduino-1.6.12-windows\arduino-1.6.12\libraries\blinker-library-master\src/Blinker/BlinkerStream.h:39:25: note: 	virtual int BlinkerStream::needFreshShare()virtual int needFreshShare() = 0;^

出现这个问题是因为开发板选择错了,选择的是 arduino Uno
解决办法:将开发板改为wifiduino

2.开发板选择错误可能出现的错误:

在这里插入图片描述原因:开发板选择错误,可能选择了Generic ESP8266 module
解决:将开发板选择为wifiduino

3.上传出错情况

在这里插入图片描述可以参考github上的解决方案,特别全:
https://github.com/esp8266/Arduino/blob/master/doc/faq/a01-espcomm_sync-failed.rst

  相关解决方案