Topic: ESP8266NodeMcu V3 не могу откомпилировать иcходный код.
Не могу откомпилировать подскажите может я не правильно настроил конфигурацию для ESP8266NodeMcu V3 ?
Пример из Arduino IDE ESP8266WIFI-WIFIWebServer откомпили́ровать получилось а иcходный код для ESP8266NodeMcu V3 не как не получаеться. Мне кажеться что конфликтуют библиотеки ESP8266WiFi.h RemoteXY.h.
У меня конфигурация такая
Соединение: Cloud server
Контроллер:NodeMcu V3
Модуль:Integrated WIFI
Среда: Arduino IDE.
Установил
библиотеки ESP8266WiFi.h RemoteXY.h
плата Generic ESP8266 Module.
При компиляции выдаёт ошибку.
Arduino: 1.8.7 (Windows 10), Плата:"Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None"
In file included from C:\Users\Klient\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:161:0,
from C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino:38:
C:\Users\Klient\Documents\Arduino\libraries\RemoteXY\src/RemoteXYComm_WiFi.h: In member function 'virtual uint8_t CRemoteXYServer_WiFi::available(CRemoteXYClient*)':
C:\Users\Klient\Documents\Arduino\libraries\RemoteXY\src/RemoteXYComm_WiFi.h:135:12: error: 'class WiFiClient' has no member named 'disableKeepAlive'
cl.disableKeepAlive (); // remove memory leak
^
C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino: In function 'void setup()':
sketch_sep11a:62:23: error: 'D2' was not declared in this scope
#define PIN_BUTTON_01 D2
^
C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino:69:12: note: in expansion of macro 'PIN_BUTTON_01'
pinMode (PIN_BUTTON_01, OUTPUT);
^
C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino: In function 'void loop()':
sketch_sep11a:62:23: error: 'D2' was not declared in this scope
#define PIN_BUTTON_01 D2
^
C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino:79:16: note: in expansion of macro 'PIN_BUTTON_01'
digitalWrite(PIN_BUTTON_01, (RemoteXY.button_01==0)?LOW:HIGH);
^
In file included from C:\Users\Klient\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from C:\Users\Klient\AppData\Local\Temp\arduino_modified_sketch_492240\sketch_sep11a.ino:28:
C:\Users\Klient\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h: In instantiation of 'size_t WiFiClient::write(T&, size_t) [with T = unsigned char [256]; size_t = unsigned int]':
C:\Users\Klient\Documents\Arduino\libraries\RemoteXY\src/RemoteXYComm_WiFi.h:71:48: required from here
C:\Users\Klient\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h:123:36: error: request for member 'available' in 'source', which is of non-class type 'unsigned char [256]'
size_t left = source.available();
^
C:\Users\Klient\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h:127:5: error: request for member 'read' in 'source', which is of non-class type 'unsigned char [256]'
source.read(buffer.get(), will_send);
^
exit status 1
'D2' was not declared in this scope
Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
"Показать подробный вывод во время компиляции"
ИСХОДНЫЙ КОД.
/*
-- New project --
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 3.1.13 or later version
download by link [url]http://remotexy.com/en/library/[/url]
To connect using RemoteXY mobile app by link [url]http://remotexy.com/en/download/[/url]
- for ANDROID 4.14.08 or later version;
- for iOS 1.11.2 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// можете включить вывод отладочной информации в Serial на 115200
//#define REMOTEXY__DEBUGLOG
// определение режима соединения и подключение библиотеки RemoteXY
#define REMOTEXY_MODE__WIFI_CLOUD
#include <ESP8266WiFi.h>
// настройки соединения
#define REMOTEXY_WIFI_SSID "YOUR_SSID"
#define REMOTEXY_WIFI_PASSWORD "YOUR_PASS"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "xxxxxxxxxxxxxxxxxxxxxxx"
#include <RemoteXY.h>
// конфигурация интерфейса RemoteXY
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = // 28 bytes
{ 255,1,0,0,0,21,0,18,0,0,0,31,1,106,200,1,1,1,0,1,
38,27,24,24,0,2,31,0 };
// структура определяет все переменные и события вашего интерфейса управления
struct {
// input variables
uint8_t button_01; // =1 если кнопка нажата, иначе =0
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_BUTTON_01 D2
void setup()
{
RemoteXY_Init ();
pinMode (PIN_BUTTON_01, OUTPUT);
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
digitalWrite(PIN_BUTTON_01, (RemoteXY.button_01==0)?LOW:HIGH);
// TODO you loop code
// используйте структуру RemoteXY для передачи данных
// не используйте функцию delay(), вместо нее используйте RemoteXY_delay()
}