sdfghjjh

Dependencies:   Adafruit_GFX WIZnetInterface mbed

Fork of Weather_Forecast_Helloworld_WIZwiki-W7500 by IOP

Revision:
10:961467f6c8db
Parent:
9:5ae28a194322
Child:
11:d6285226f186
--- a/main.cpp	Mon Apr 11 23:33:33 2016 +0000
+++ b/main.cpp	Wed May 11 00:52:04 2016 +0000
@@ -102,7 +102,8 @@
    
     int phy_link;
     printf("Wait a second...\r\n");
-    uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0xff, 0xff, 0xa0}; 
+//--------- Have to modify the mac address-------------
+    uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0xff, 0xff, 0x22}; 
 
     EthernetInterface eth;    
     
@@ -134,9 +135,9 @@
    /*  
     *    GET method, to request weather forecast  
     */ 
-   char http_cmd[] = "GET /data/2.5/weather?q=Seoul,kr&appid=b1b15e88fa797225412429c1c50c122a HTTP/1.0\n\n";
-    //char http_cmd[] = "GET /data/2.5/weather?q=London,uk&appid=b1b15e88fa797225412429c1c50c122a HTTP/1.0\n\n";
-    //char http_cmd[] = "GET /data/2.5/weather?q=Berlin,de&appid=b1b15e88fa797225412429c1c50c122a HTTP/1.0\n\n";
+   //char http_cmd[] = "GET /data/2.5/weather?q=Seoul,kr&appid=a0ca47dd7f6066404629b3e1ad728981 HTTP/1.0\n\n";
+    char http_cmd[] = "GET /data/2.5/weather?q=London,uk&appid=a0ca47dd7f6066404629b3e1ad728981 HTTP/1.0\n\n";
+    //char http_cmd[] = "GET /data/2.5/weather?q=Berlin,de&appid=a0ca47dd7f6066404629b3e1ad728981 HTTP/1.0\n\n";
     
     sock.send_all(http_cmd, sizeof(http_cmd)-1);
     
@@ -213,12 +214,13 @@
    /*
     *    kelvin to celius converter
     */
-    num100 = temper_data[0] - 48;
+    num100 = temper_data[0]- 48;
     num10 = temper_data[1] - 48;
-    num1 = temper_data[2] - 48;
+    num1 = temper_data[2]- 48;
     
     temp = (num100*100 + num10*10 + num1) - 273;
     
+    
    /* 
     *    printf  
     */
@@ -259,7 +261,7 @@
    /* 
     *    everytime in delay, request weather forecast 
     */
-    wait(60.0);
+    wait(20.0);
     
    };