Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32 arduino #19

Open
SuryaTejMahankali opened this issue Sep 28, 2018 · 3 comments
Open

esp32 arduino #19

SuryaTejMahankali opened this issue Sep 28, 2018 · 3 comments

Comments

@SuryaTejMahankali
Copy link

this is the program the same autoconnect program
void setup() {
Serial.begin(115200);

WiFiManager wifiManager;
wifiManager.autoConnect("AutoConnectAP");
Serial.println("connected...yeey :)");

}

void loop() {
// put your main code here, to run repeatedly:

}

Getting error:
_In file included from C:\Users\HP\AppData\Local\Temp\arduino_modified_sketch_722435\AutoConnect.ino:14:0:

C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";

                  ^

In file included from C:\Users\HP\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/WebServer.h:30:0,

             from C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master/WiFiManager.h:21,

             from C:\Users\HP\AppData\Local\Temp\arduino_modified_sketch_722435\AutoConnect.ino:14:

C:\Users\HP\Documents\Arduino\hardware\espressif\esp32\libraries\WebServer\src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'

HTTP_HEAD = 0b00100000,

^

Multiple libraries were found for "WiFiManager.h"
Used: C:\Users\HP\Documents\Arduino\libraries\WIFIMANAGER-ESP32-master
Not used: C:\Users\HP\Documents\Arduino\libraries\WiFiManager-0.14.0_

plz help struggling for almost 3 days.

@bobermen1
Copy link

Copied from another reply

I was having this issue with the examples as well.
To fix it I replaced

#if defined(ESP8266)
#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino
#else
#include <WiFi.h>          //https://github.com/esp8266/Arduino
#endif

//needed for library
#include <DNSServer.h>
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager

With

#include <WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

@standarddeviant
Copy link

standarddeviant commented Oct 10, 2018

I have the same issue. @bobermen1 which library/file did you edit?

I got around this problem by changing lines 4-13 of
C:\Users\dc\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WebServer\src\HTTP_Method.h

from

typedef enum {
  HTTP_GET     = 0b00000001,
  HTTP_POST    = 0b00000010,
  HTTP_DELETE  = 0b00000100,
  HTTP_PUT     = 0b00001000,
  HTTP_PATCH   = 0b00010000,
  HTTP_HEAD  = 0b00100000,
  HTTP_OPTIONS = 0b01000000,
  HTTP_ANY     = 0b01111111,
} HTTPMethod;

to

typedef enum {
  HTTP_GET     = 0b00000001,
  HTTP_POST    = 0b00000010,
  HTTP_DELETE  = 0b00000100,
  HTTP_PUT     = 0b00001000,
  HTTP_PATCH   = 0b00010000,
  HTTP_HEADWS  = 0b00100000,
  HTTP_OPTIONS = 0b01000000,
  HTTP_ANY     = 0b01111111,
} HTTPMethod;

This is a total hack, but it works because the enum value HTTP_HEAD doesn't seem to be used by esp32-WebServer.

@shahidare
Copy link

Hi,

I did the changes it still seems not to be working.

I am getting the follow error message.

In file included from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:14:0:
/Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";
^
In file included from /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/WebServer.h:30:0,
from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:12:
/Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'
HTTP_HEAD = 0b00100000,
^
Multiple libraries were found for "WiFi.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Multiple libraries were found for "DNSServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/DNSServer
Not used: /Users/Sid/Documents/Arduino/libraries/DNSServer---esp32-master
Multiple libraries were found for "WebServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer
Not used: /Users/Sid/Documents/Arduino/libraries/WebServer-esp32-master
exit status 1
Error compiling for board Node32s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants