Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf HTTPClient_ToBeRemoved mbed
Fork of WebApiTest by
Revision 1:90bee12c6c74, committed 2015-09-14
- Comitter:
- jksoft
- Date:
- Mon Sep 14 21:03:05 2015 +0000
- Parent:
- 0:5fdf32706674
- Commit message:
- ????
Changed in this revision
| TextLCD.lib | Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/TextLCD.lib Sat Aug 11 14:26:14 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- 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);
}
