From c4f40430071cec0dbe6055ed5ac28069b7ac5e4e Mon Sep 17 00:00:00 2001 From: Flavien Haas Date: Tue, 12 Jun 2018 15:58:42 +0200 Subject: [PATCH] new website --- WebServer/gg.html | 64 ++++++++++++++++++++++++++++++++++++++++++++ WebServer/index.html | 21 ++++++++++----- gateway/gateway.ino | 8 +++--- 3 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 WebServer/gg.html diff --git a/WebServer/gg.html b/WebServer/gg.html new file mode 100644 index 0000000..83d4b4e --- /dev/null +++ b/WebServer/gg.html @@ -0,0 +1,64 @@ + + + + + fadeIn demo + + + + + +
+
+
+

Passerelle LoRa

+
+
+

[Température actuelle]

+
+
+

+ Nombre d'échantillons envoyés = %, Echec d'envoi : % +

+
+
+ +
+
+ + + + + diff --git a/WebServer/index.html b/WebServer/index.html index 8c7e8fa..0d47d19 100644 --- a/WebServer/index.html +++ b/WebServer/index.html @@ -3,7 +3,7 @@ - + Passerelle LoRa + - - -->

Passerelle LoRa

@@ -96,7 +100,7 @@

- + + diff --git a/gateway/gateway.ino b/gateway/gateway.ino index 8212bd0..972de83 100644 --- a/gateway/gateway.ino +++ b/gateway/gateway.ino @@ -27,7 +27,6 @@ int numCase; // used to associat void setup(){ SerialUSB.begin(9600); - while (!SerialUSB); // wait for serial to initialize SerialUSB.println("LoRa Gateway"); // display on serial the name of the device thisLoRa.begin(); // initialise LoRa @@ -104,7 +103,7 @@ void loop() { // WebServer EthernetClient serverGateway = server.available(); // try to get client - if (serverGateway) { // got client? + while (serverGateway) { // got client? boolean currentLineIsBlank = true; if (serverGateway.connected()) { if (serverGateway.available()) { // client data available to read @@ -125,7 +124,7 @@ void loop() { } webFile.close(); } - //break; + break; } // every line of text received from the client ends with \r\n if (c == '\n') { @@ -140,7 +139,8 @@ void loop() { } // end if (client.available()) } // end while (client.connected()) delay(1); // give the web browser time to receive the data - serverGateway.stop(); // close the connection + serverGateway.stop(); // close the connection + break; }//end if (serverGateway) }//end void loop