mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1093] ESP32 Compatible? #933
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#933
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZebNZ on GitHub (Jul 9, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1093
Hi all,
I see in the .cpp file it has:
#if defined(ESP8266) || defined(ESP32)
My question is can this work with an ESP32? If ti can what do I need to do?
I know I would need to use different libraries.....
#include <ESP8266WiFi.h>
replace with:
#include <WiFi.h>
#include <ESP8266WebServer.h>
replace with:
#include <WebServer.h>
#include <WiFiManager.h>
Thanks,
Zeb
@ZebNZ commented on GitHub (Jul 9, 2020):
It looks like in the library it decides what libraries to use based on what you define (ESP8266 or ESP32), so I would only need to change the libraries in the .ino file.
So how do you define what board you're using?
@ZebNZ commented on GitHub (Jul 9, 2020):
All working :)
Just initialize your libraries at the top of the .ino file like this:
#include <FS.h>
#include "SPIFFS.h"
#include <WebServer.h>
#include <DNSServer.h>
#include <WiFi.h>
#include <WiFiManager.h>
#include <ArduinoJson.h>
And you might need to add this at the top of the setup()
Thanks,
Zeb
@tablatronix commented on GitHub (Jul 9, 2020):
The development branch fully supports both esp8266 and esp32, there is nothing you should need to do special
You should only have to include libs you are using not the rest
#include <FS.h>
#include "SPIFFS.h"
#include <WiFiManager.h>
#include <ArduinoJson.h>
@ZebNZ commented on GitHub (Jul 9, 2020):
@tablatronix that's awesome! Thanks for your help!