University of Essex CE713

Dependencies:   mbed HTTPServer EthernetNetIf TextLCD

Fork of HTTPServerHelloWorld by Robert Gutknecht

Revision:
6:7929de136a42
Parent:
5:8b8c719307bf
Child:
7:7f4d940077bd
--- a/main.cpp	Thu Nov 30 15:13:11 2017 +0000
+++ b/main.cpp	Thu Nov 30 15:30:41 2017 +0000
@@ -309,10 +309,10 @@
         lcd.printf("x%.1f y%.1f z%.1f", GyroRate[0], GyroRate[1], GyroRate[2]);   
         wait(1);                                      // wait 1 second
         lcd.cls();                                    // clear lcd
-        lcd.printf("MAC Address = ");
-        mbed_mac_address(mac);
-        for(int i=0; i<6;i++) {
-            lcd.printf("%02X ", mac[i]);
+        lcd.printf("MAC Address = ");                 // print to LCD
+        mbed_mac_address(mac);                        // get MAC address
+        for(int i=0; i<6;i++) {                       // step through MAC address characters
+            lcd.printf("%02X ", mac[i]);              // print MAC address
         }
         printf("\n");            
         wait(.4);                                     // wait 0.4 second
@@ -325,7 +325,7 @@
         Servo1(spos);                                 // update servo
         // HTTPText("<html><head><title>Hello World online</title></head><body><h1>New Message !!!!</h1></body></html>");
         char Buffer[100];
-        sprintf(Buffer, "<html><head><title>Hello World online</title></head><body><h1> Temperature = %f %s", temp, "</h1></body></html>");
+        sprintf(Buffer, "<html><head><title>Hello World online</title></head><body><h1> Temperature = %.3f %s", temp, "</h1></body></html>");
         HTTPText(Buffer);                             // ouput temperature on web page 
     }
 }