gs fan
/
GSwifi_xively
Xively (Cosm, Pachube) feed see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
Diff: main.cpp
- Revision:
- 1:0852a9bd5365
- Parent:
- 0:0360c49c3bbe
- Child:
- 2:a8ab83e57440
--- 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";