|
开发文档上写着:// 在Arduino UNO上使用软串口通信Blinker.begin(); // 默认设置: 数字IO 2(RX) 3(TX), 波特率 9600 bps Blinker.begin(4, 5); // 设置数字IO 4(RX) 5(TX), 默认波特率 9600 bps Blinker.begin(4, 5, 115200); // 设置数字IO 4(RX) 5(TX) 及波特率 115200 bps // 在Arduino Mega/Due上使用硬串口通信Blinker.begin(15, 14, 9600); //使用Serial3 Blinker.begin(17, 16, 115200); //使用Serial2 Blinker.begin(19, 20, 115200); //使用Serial
我用的是WEMOS D1 R1的板子,WIFI接入已经成功,又想用它来试试蓝牙接入(连接了JDY18模块),于是打开了Blinker蓝牙实例,由于WEMOS D1 R1开发板的RX,TX分别为D0,D1
我将Blinker.begin(); 改为Blinker.begin(D0,D1,9600);
编译时显示:
Arduino:1.8.3 (Windows 10), 开发板:"WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
In file included from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h:25:0,
from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:21,
from C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:48:
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerSerial.h: In member function 'virtual char* BlinkerSerial::lastRead()':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerSerial.h:36:75: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char * lastRead() { if (isFresh) return streamData; else return ""; }
^
In file included from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:83:0,
from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h:26,
from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:21,
from C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:48:
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h: In member function 'char* BlinkerProtocol::dataParse()':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:234:86: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char* dataParse() { if (canParse) return conn->lastRead(); else return ""; }
^
In file included from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h:26:0,
from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:21,
from C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:48:
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: At global scope:
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:777:97: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
BlinkerWidgets_string _BUILTIN_SWITCH = BlinkerWidgets_string(BLINKER_CMD_BUILTIN_SWITCH);
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_str(uint8_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7012:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "";
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_joy(uint8_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7019:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "";
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_rgb(uint8_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7026:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "";
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_int(uint8_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7032:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "";
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'char* BlinkerApi::widgetName_tab(uint8_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:7038:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "";
^
In file included from C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:21:0,
from C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:48:
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h: In member function 'void BlinkerSerialBLE::begin(uint8_t, uint8_t, uint32_t)':
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h:93:30: error: 'RX' was not declared in this scope
if (ss_rx_pin == RX && ss_tx_pin == TX) {
^
C:\Users\MSI\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSerialBLE.h:93:49: error: 'TX' was not declared in this scope
if (ss_rx_pin == RX && ss_tx_pin == TX) {
^
C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino: At global scope:
C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:50:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
BlinkerButton Button1("btn-abc");
^
C:\Users\MSI\AppData\Local\Temp\arduino_modified_sketch_464883\Hello_BLE.ino:51:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
BlinkerNumber Number1("num-abc");
^
exit status 1
为开发板 WeMos D1 R1 编译时出错。
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
Blinker蓝牙接入不能用WEMOS D1 R1吗
|
|