diff --git a/.gitmodules b/.gitmodules index bd5fea4..78f1e55 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/RF24Mesh"] path = lib/RF24Mesh url = git@github.com:nRF24/RF24Mesh.git +[submodule "lib/ArduinoJson"] + path = lib/ArduinoJson + url = git@github.com:bblanchon/ArduinoJson.git diff --git a/data/index.html b/data/index.html new file mode 100644 index 0000000..a214c59 --- /dev/null +++ b/data/index.html @@ -0,0 +1,40 @@ + + + ESP8266 Input Example + + + + + + + + + + +


ESP8266 Server - Getting input from a client

+
+ + + + + + +
MQTT AddressNode ID
+ +
+ + diff --git a/lib/ArduinoJson b/lib/ArduinoJson new file mode 160000 index 0000000..cf5396a --- /dev/null +++ b/lib/ArduinoJson @@ -0,0 +1 @@ +Subproject commit cf5396aaed6d16d1fb4e73b82ce6606938591043 diff --git a/src/main.ino b/src/main.ino index 5eb0280..ec7d544 100644 --- a/src/main.ino +++ b/src/main.ino @@ -1,26 +1,14 @@ - /** RF24Mesh_Example_Master.ino by TMRh20 - * - * - * This example sketch shows how to manually configure a node via RF24Mesh as a master node, which - * will receive all data from sensor nodes. - * - * The nodes can change physical or logical position in the network, and reconnect through different - * routing nodes as required. The master node manages the address assignments for the individual nodes - * in a manner similar to DHCP. - * - */ - - #include #include #include +#include +#include "FS.h" + #include "RF24Network.h" #include "RF24.h" #include "RF24Mesh.h" #include -//Include eeprom.h for AVR (Uno, Nano) etc. except ATTiny -#include const char* ssid = "XXXX"; const char* password = "XXXX"; @@ -32,8 +20,6 @@ RF24Mesh mesh(radio,network); ESP8266WebServer http(80); -uint32_t displayTimer = 0; - String webpage = ""; @@ -59,7 +45,7 @@ void setup() { Serial.println(WiFi.localIP()); // Setup the web server - http.on("/", [](){ + http.on("/clients", [](){ webpage = "

Connected Clients:


"; for(int i=0; i 5000){ - displayTimer = millis(); - Serial.println(" "); - Serial.println(F("********Assigned Addresses********")); - for(int i=0; i