hhtgeg

Fork of WizFi310Interface_Legacy_newv2 by ajeet prajapati

Files at this revision

API Documentation at this revision

Comitter:
ajeet3004
Date:
Mon Sep 18 08:26:47 2017 +0000
Parent:
2:3194ebe06182
Commit message:
WiFiForecast

Changed in this revision

WizFi310Interface.cpp Show annotated file Show diff for this revision Revisions of this file
WizFi310Interface.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3194ebe06182 -r 7da9385861f8 WizFi310Interface.cpp
--- a/WizFi310Interface.cpp	Mon Sep 18 08:11:28 2017 +0000
+++ b/WizFi310Interface.cpp	Mon Sep 18 08:26:47 2017 +0000
@@ -91,7 +91,7 @@
 //}
 
 
-int WizFi310Interface::test_twitter()
+int WizFi310Interface::test_weathermap()
 {   
 	// TCPSocketConnection();
    int errConnect;
@@ -99,7 +99,7 @@
     char buffer[2048] = "";
 	TCPSocketConnection TCPconnection;
 
-   char *p="arduino-tweet.appspot.com";
+   char *p="api.openweathermap.org";
    int a=TCPconnection.connect(p,80);
   while (true) {
         if(a!=0) {
@@ -111,7 +111,7 @@
         }
     }    
      
-    sprintf((char *)http_cmd,"GET http://arduino-tweet.appspot.com/update?token=904626807491530753-sOaChz44g9YFS7EuvRkR75l1W9T303K&status=hell\r\n");
+    sprintf((char *)http_cmd,"GET /data/2.5/weather?q=Seoul,kr&appid=a0ca47dd7f6066404629b3e1ad728981 HTTP/1.0\n\n");
 
     TCPconnection.send_all(http_cmd, sizeof(http_cmd));
     
diff -r 3194ebe06182 -r 7da9385861f8 WizFi310Interface.h
--- a/WizFi310Interface.h	Mon Sep 18 08:11:28 2017 +0000
+++ b/WizFi310Interface.h	Mon Sep 18 08:26:47 2017 +0000
@@ -39,7 +39,7 @@
     int init(const char* ip, const char* mask, const char* gateway, const char* name = NULL);
     int connect(Security sec, const char* ssid, const char* phrase, WiFiMode mode = WM_STATION);
     int disconnect();
-    int test_twitter();
+    int test_weathermap();
     char* getMACAddress();
     char* getIPAddress();
     char* getGateway();