Plymouth ELEC351 Group T / Mbed OS ELEC351_Group_T

Fork of ELEC351 by Plymouth ELEC351 Group T

Revision:
41:859b5e1e3d9a
Parent:
37:7c4d7f206039
Child:
45:875f7e18a386
--- a/NETWORK.cpp	Sun Jan 07 23:01:38 2018 +0000
+++ b/NETWORK.cpp	Mon Jan 08 14:20:30 2018 +0000
@@ -10,7 +10,6 @@
 
 int Network_Init()
 { 
-    printf("Basic HTTP server example\n");
     //Configure an ethernet connection
     EthernetInterface eth;
     eth.set_network(IP, NETMASK, GATEWAY);
@@ -38,8 +37,7 @@
         //using namespace std;
         //Block and wait on an incoming connection
         srv.accept(&clt_sock, &clt_addr);
-        printf("accept %s:%d\n", clt_addr.get_ip_address(), clt_addr.get_port());
-        printf("In networking");
+        printf("Networking connection accept %s:%d\n", clt_addr.get_ip_address(), clt_addr.get_port());
         //Uses a C++ string to make it easier to concatinate
         string response;
         //This is a C string
@@ -52,17 +50,15 @@
         char output7_str[64];
         char output8_str[64];
         
-        
-     
         //Convert to a C String
-        sprintf(output1_str, "%d/" , network_day);
-        sprintf(output2_str, "%d/" , network_month);
-        sprintf(output3_str, "%d   " , network_year);
-        sprintf(output4_str, "Time:%d:" , network_hours);
-        sprintf(output5_str, "%d   " , network_minute);
-        sprintf(output6_str, "Temperature is : %1.1f   " , network_temperature);
-        sprintf(output7_str, "Pressure is : %1.1f   " , network_pressure);
-        sprintf(output8_str, "Light is : %5.3f   " , network_light);
+        sprintf(output1_str, "%d/" , network_day);//Print Day
+        sprintf(output2_str, "%d/" , network_month);//Print Month
+        sprintf(output3_str, "%d   " , network_year);//Print Year
+        sprintf(output4_str, "Time:%d:" , network_hours);//Print Hours
+        sprintf(output5_str, "%d   " , network_minute);//Print Minute
+        sprintf(output6_str, "Temperature is : %1.1f   " , network_temperature);//Print temperature
+        sprintf(output7_str, "Pressure is : %1.1f   " , network_pressure);//Print Pressure
+        sprintf(output8_str, "Light is : %5.3f   " , network_light);//Print Light level
         
         
         //Build the C++ string response