WebAPIに繋ぐためのテスト用です。

Dependencies:   EthernetNetIf HTTPClient_ToBeRemoved mbed

Fork of WebApiTest by Junichi Katsu

Revision:
1:90bee12c6c74
Parent:
0:5fdf32706674
--- a/main.cpp	Sat Aug 11 14:26:14 2012 +0000
+++ b/main.cpp	Mon Sep 14 21:03:05 2015 +0000
@@ -3,7 +3,6 @@
 #include "TextLCD.h"
 #include "HTTPClient.h"
 
-TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
 
 EthernetNetIf eth; 
 HTTPClient http;
@@ -41,13 +40,11 @@
     EthernetErr ethErr = eth.setup();
     if(ethErr)
     {
-        lcd.locate(0,0);
-        lcd.printf("Ethernet err.");
+        printf("Ethernet err.\r\n");
         return(-1);
     }
     
-    lcd.locate(0,0);
-    lcd.printf("Getting info.");
+    printf("Getting info.\r\n");
     
     HTTPText txt;
     
@@ -62,15 +59,12 @@
         j_paser(txt.gets() , "usage" , usage);
         j_paser(txt.gets() , "capacity" , capacity);
         
-        lcd.locate(0,0);
-        lcd.printf("%s/%s/%s %sh",year,month,day,hour);
-        lcd.locate(0,1);
-        lcd.printf("%s/%s %3.1f%%",usage,capacity,(((float)atoi(usage)/(float)atoi(capacity))*100.0));
+        printf("%s/%s/%s %sh\r\n",year,month,day,hour);
+        printf("%s/%s %3.1f%%\r\n",usage,capacity,(((float)atoi(usage)/(float)atoi(capacity))*100.0));
     }
     else
     {
-        lcd.locate(0,0);
-        lcd.printf("Http get err.");
+        printf("Http get err.\r\n");
         return(-1);
     }