added captive portal

removed mdsn lib
changed dependencies and constructor
This commit is contained in:
Alex Tudorache
2015-09-11 18:51:21 +03:00
parent 20dbfed7c6
commit d2bd81121d
4 changed files with 403 additions and 89 deletions
+19 -18
View File
@@ -2,29 +2,30 @@
//needed for library
#include <EEPROM.h>
#include <ESP8266mDNS.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
//this intitilises the library, parameter is eeprom start
WiFiManager wifi(0);
WiFiManager wifi;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
//WiFiManager
//fetches ssid and pass from eeprom and tries to connect
//if it does not connect it starts an access point with the specified name
//here "AutoConnectAP"
//and goes into a blocking loop awaiting configuration
wifi.autoConnect("AutoConnectAP");
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
// put your setup code here, to run once:
Serial.begin(115200);
//WiFiManager
//fetches ssid and pass from eeprom and tries to connect
//if it does not connect it starts an access point with the specified name
//here "AutoConnectAP"
//and goes into a blocking loop awaiting configuration
wifi.autoConnect("AutoConnectAP");
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
void loop() {
// put your main code here, to run repeatedly:
}
// put your main code here, to run repeatedly:
}
@@ -1,23 +1,30 @@
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
//needed for library
#include <EEPROM.h>
#include <ESP8266mDNS.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
#include <EEPROM.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
//this intitilises the library, parameter is eeprom start
WiFiManager wifi(0);
WiFiManager wifi;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
//reset settings - for testing
//wifi.resetSettings();
//WiFiManager
//sets timeout until configuration portal gets turned off
//useful to make it all retry or go to sleep
//in seconds
wifi.setTimeout(120);
wifi.setTimeout(180);
//fetches ssid and pass from eeprom and tries to connect
//if it does not connect it starts an access point with the specified name