做NUO连接蓝牙的例子结果编译出现错误
In file included from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/BlinkerSerialBLE.h:25:0,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker.h:21,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino:48:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Adapters/BlinkerSerial.h: In member function 'virtual char* BlinkerSerial::lastRead()':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Adapters/BlinkerSerial.h:36:75: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char * lastRead() { if (isFresh) return streamData; else return ""; }
^~
In file included from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:83:0,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/BlinkerSerialBLE.h:26,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker.h:21,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino:48:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::dataParse()':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerProtocol.h:228: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\hp1\Documents\Arduino\libraries\Blinker\src/BlinkerSerialBLE.h:26:0,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker.h:21,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino:48:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: At global scope:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:764: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\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_str(uint8_t)':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:6960:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_joy(uint8_t)':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:6967:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_rgb(uint8_t)':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:6974:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_int(uint8_t)':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:6980:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_tab(uint8_t)':
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker/BlinkerApi.h:6986:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
else return "";
^~
C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino: At global scope:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino:50:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
BlinkerButton Button1("btn-abc");
^
C:\Users\hp1\Documents\Arduino\libraries\Blinker\examples\Blinker_Hello\Hello_BLE\Hello_BLE.ino:51:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
BlinkerNumber Number1("num-abc");
是blinker库的问题吗
写有error的才是报错,你上面贴的内容没有报错 coloz 发表于 2019-10-29 12:26
写有error的才是报错,你上面贴的内容没有报错
那什么意思,为什么会这样
而且上传完成以后blinker开关灯没有反应 sbt147 发表于 2019-10-29 23:54
那什么意思,为什么会这样
而且上传完成以后blinker开关灯没有反应
如果编译错误,那肯定都没上传程序。如果编译错误,就请贴出报错,才能知道原因。 coloz 发表于 2019-10-30 00:03
如果编译错误,那肯定都没上传程序。如果编译错误,就请贴出报错,才能知道原因。 ...
我已经把全部报告都贴出来了啊 sbt147 发表于 2019-10-30 00:23
我已经把全部报告都贴出来了啊
我编译什么都一样的 sbt147 发表于 2019-10-30 00:23
我已经把全部报告都贴出来了啊
首先,您贴的内容里没有报错,如果没有报错,我也不知道是什么问题。
其次,请确认是否显示上传成功,如果上传成功了,那就说明编译正常,没有报错。如果还有其他使用问题,请参照指南提问:
https://www.arduino.cn/thread-83658-1-1.html
sbt147 发表于 2019-10-30 00:23
我已经把全部报告都贴出来了啊
我把编译器换成1.6.5以后错误变成了这个
Arduino:1.6.5 (Windows 8.1), 板:"Arduino Uno"
In file included from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/BlinkerSerialBLE.h:25:0,
from C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Blinker.h:21,
from Hello_BLE.ino:48:
C:\Users\hp1\Documents\Arduino\libraries\Blinker\src/Adapters/BlinkerSerial.h:21:32: fatal error: SoftwareSerial.h: No such file or directory
#include <SoftwareSerial.h>
^
compilation terminated.
Multiple libraries were found for "Blinker.h"
Used: C:\Users\hp1\Documents\Arduino\libraries\Blinker
Not used: C:\Users\hp1\Desktop\arduino-1.6.5\libraries\blinker
编译有误。
报告将会包含更多的信息
"在编译时,输出详细信息"
在 文件>首选项 中启用
sbt147 发表于 2019-10-30 15:19
我把编译器换成1.6.5以后错误变成了这个
Arduino:1.6.5 (Windows 8.1), 板:"Arduino Uno"
blinker文档有写:https://diandeng.tech/doc/arduino-support
IDE需要1.8.7以上 coloz 发表于 2019-10-30 15:28
blinker文档有写:https://diandeng.tech/doc/arduino-support
IDE需要1.8.7以上
又回到了最初的问题了:L