Version 8, working version with Alix, sams and ollies code. Displays time, date and sensor info onto terminal, LCD and networking, and saves onto SD card.

Dependencies:   BMP280 ELEC350-Practicals-FZ429 TextLCD BME280 ntp-client

Revision:
11:42b0c567cc8c
Parent:
10:eea19f8e6122
Child:
12:4c7eaac8ceef
--- a/Network.hpp	Thu Dec 13 15:24:22 2018 +0000
+++ b/Network.hpp	Thu Dec 13 15:46:07 2018 +0000
@@ -27,47 +27,43 @@
 
 
 
-#define HTTP_STATUS_LINE "HTTP/1.0 200 OK" 
+ 
 
+#define HTTP_STATUS_LINE "HTTP/1.0 200 OK" 
 #define HTTP_HEADER_FIELDS "Content-Type: text/html; charset=utf-8" 
-
 #define HTTP_MESSAGE_BODY1 ""                                    \
 "<html>" "\r\n"                                                  \
 "  <body style=\"display:flex;text-align:center\">" "\r\n"       \
-"    <div style=\"margin:auto\">" "\r\n"                         \
-"      <h1>Alright sunshine</h1>" "\r\n"                         \
+"    <div id=\"Sensor Data\" name=\"Sensor Date\" style=\"margin:auto\">" "\r\n"        \
+"      <h1> <b>Sensor Data</b> </h1>" "\r\n"                     \
 "      <p>The LDR value is "                                    
 
 #define HTTP_MESSAGE_BODY2 ""                                    \
-       "</p>" "\r\n"                                             \
+       " Lux </p>" "\r\n"                                        \
+"    <div style=\"margin:auto\">" "\r\n"                         \
+"      <p>The Temperature value is "     
+
+#define HTTP_MESSAGE_BODY3 ""                                    \
+       " Degrees</p>" "\r\n"                                     \
+"    <div style=\"margin:auto\">" "\r\n"                         \
+"      <p>The Pressure value is "       
+
+#define HTTP_MESSAGE_BODY4 ""                                    \
+       " mbar </p>" "\r\n"                                     \
+"    <div style=\"margin:auto\">" "\r\n"                         \
+"      <p>The current Time is  "       
+
+#define HTTP_MESSAGE_BODY5 ""                                    \
+       " </p>" "\r\n"                                       \
 "    </div>" "\r\n"                                              \
 "  </body>" "\r\n"                                               \
 "</html>" 
 
-#define HTTP_MESSAGE_BODY3 ""                                    \
-"<html>" "\r\n"                                                  \
-"  <body style=\"display:flex;text-align:center\">" "\r\n"       \
-"    <div style=\"margin:auto\">" "\r\n"                         \
-"      <p>The Temperature value is "
-
-#define HTTP_MESSAGE_BODY4 ""                                    \
-       "</p>" "\r\n"                                             \
-"    </div>" "\r\n"                                              \
-"  </body>" "\r\n"                                               \
-"</html>"
+ 
 
-#define HTTP_MESSAGE_BODY5 ""                                    \
-"<html>" "\r\n"                                                  \
-"  <body style=\"display:flex;text-align:center\">" "\r\n"       \
-"    <div style=\"margin:auto\">" "\r\n"                         \
-"      <p>The Pressure value is "
+ 
 
-#define HTTP_MESSAGE_BODY6 ""                                    \
-       "</p>" "\r\n"                                             \
-"    </div>" "\r\n"                                              \
-"  </body>" "\r\n"                                               \
-"</html>"
-
+ 
 #define HTTP_RESPONSE HTTP_STATUS_LINE "\r\n"   \
                       HTTP_HEADER_FIELDS "\r\n" \
                       "\r\n"                    \
@@ -210,7 +206,6 @@
          
 
          
-
         //Build the C++ string response 
 
         response = HTTP_MESSAGE_BODY1; 
@@ -219,26 +214,18 @@
 
         response += HTTP_MESSAGE_BODY2; 
 
-        
+        response += temp_str; 
 
-        response = HTTP_MESSAGE_BODY3; 
+        response += HTTP_MESSAGE_BODY3; 
 
-        response += temp_str; 
+        response += pressure_str; 
 
         response += HTTP_MESSAGE_BODY4; 
 
-         
-
-         response += HTTP_MESSAGE_BODY5; 
-
-        //response += pressure_str; 
-
-        response += time; 
+        response += time;
         
-        
-        response += HTTP_MESSAGE_BODY6; 
-
-              
+        response += HTTP_MESSAGE_BODY5; 
+