gs fan
/
GSwifi_cosm_pachube
Cosm (Pachube) feed see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
Revision 1:0852a9bd5365, committed 2013-04-03
- Comitter:
- gsfan
- Date:
- Wed Apr 03 08:48:41 2013 +0000
- Parent:
- 0:0360c49c3bbe
- Commit message:
- fix
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 29 15:01:57 2013 +0000 +++ b/main.cpp Wed Apr 03 08:48:41 2013 +0000 @@ -25,6 +25,7 @@ } int cosm (char *data) { + int i; Host host; int cid; char buf[100]; @@ -49,12 +50,15 @@ gs.send(cid, "\r\n", 2); gs.send(cid, data, strlen(data)); + for (i = 0; i < 10; i ++) { + if (! gs.isConnected(cid)) break; + wait(100); + } gs.close(cid); return 0; } int main () { - int r; IpAddr ipaddr, netmask, gateway, nameserver; char data[] = "1,123\r\n2,345\r\n";