A simple web interface for ESP8266 to configure the installed nodes!
Using the code you can configure ESP nodes after installation via web interface.
I have aleady costomize the code as a ThingsBoard client. You can modify it for any tasks as you want.
you can use the included example for DHT11 WiFi sensor, but if you want your own please follow the steps:
- Create your Arduino project.
- add the following lines just at the begining of your file.
#include <FS.h> //this needs to be first, or it all crashes and burns...
#include <PubSubClient.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include "myWiFiManager.h"
3-Program your setup():
void setup() {
Serial.begin(115200);
Serial.println("Initializing...");
myWiFiManagerSetup();
/**************************************/
//Do what you want!!!
/**************************************/
}
- Create the loop:
void loop() {
server.handleClient();
if(APisConnected)
{
/*****************************************/
//Do what you want!!!
/*****************************************/
client.loop();
}
else
{
/*****************************************/
//Do what you want!!!
/*****************************************/
}
}
- Copy
myWiFiManager.h
anddata
in the same folder as the main file. - Upload the
data
folder. You have to follow https://github.com/esp8266/arduino-esp8266fs-plugin to upload data folder into SPIFFS filesystem image. - Upload your code.
First time after all, open 192.168.4.1:83
(you can change the default port):