Вот код и сообщение об ошибке, код - это просто тестовый файл, прежде чем я работаю с кодом, и когда я импортирую только Keypad.h и Keypad_I2 C .h, он работал нормально, также работает, когда Я только импортирую ESP8266WiFi.h. Когда я пытался импортировать только одну из библиотеки клавиатуры и ESP8266WiFi.h, произошла ошибка.
Код:
#include <Keypad_I2C.h>
#include <Keypad.h>
//#include <ArduinoJson.h>
//#include<SoftwareSerial.h>
#include<ESP8266WiFi.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Сообщения об ошибках:
In file included from sketch\ImportTest.ino.cpp:1:0:
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected identifier before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected '}' before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected unqualified-id before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
In file included from C:\Users\user\Documents\Arduino\ImportTest\ImportTest.ino:5:0:
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/ESP8266WiFi.h:29:1: error: expected declaration before '}' token
}
^
Multiple libraries were found for "Keypad_I2C.h"
Used: C:\Users\user\Documents\Arduino\libraries\arduino_keypads-master
Multiple libraries were found for "Keypad.h"
Used: C:\Users\user\Documents\Arduino\libraries\Keypad
Multiple libraries were found for "Wire.h"
Used: C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\WireESP8266
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from sketch\ImportTest.ino.cpp:1:0:
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected identifier before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected '}' before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Arduino.h:43:14: error: expected unqualified-id before numeric constant
#define HIGH 0x1
^
C:\Users\user\Documents\Arduino\libraries\Keypad\src/Keypad.h:56:16: note: in expansion of macro 'HIGH'
#define CLOSED HIGH
^
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/wl_definitions.h:73:3: note: in expansion of macro 'CLOSED'
CLOSED = 0,
^
In file included from C:\Users\user\Documents\Arduino\ImportTest\ImportTest.ino:5:0:
C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/ESP8266WiFi.h:29:1: error: expected declaration before '}' token
}
^
Multiple libraries were found for "Keypad.h"
Used: C:\Users\user\Documents\Arduino\libraries\Keypad
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.