mbed Weather Platform firmware http://mbed.org/users/okini3939/notebook/mbed-weather-platform-firmware/
Dependencies: EthernetNetIf SDHCFileSystem I2CLEDDisp Agentbed NTPClient_NetServices mbed BMP085 HTTPClient ConfigFile I2CLCD
Diff: func.cpp
- Revision:
- 6:060cb9725ce3
- Parent:
- 5:9fa79cb5ec98
- Child:
- 7:0d3484dc13a9
--- a/func.cpp Wed Jan 12 11:18:44 2011 +0000 +++ b/func.cpp Wed Jan 12 14:16:20 2011 +0000 @@ -8,6 +8,7 @@ #define TIMEZONE 9 //#define NONBLOCKING +#define STATION_URL "http://weather.sugakoubou.com/p" #define TWITTER_URL "http://api.supertweet.net/1/statuses/update.xml" extern Serial pc; @@ -46,15 +47,15 @@ strcat(post_data, conf.stations_id); strcat(post_data, "&pin="); strcat(post_data, conf.stations_pin); - sprintf(&post_data[strlen(post_data)], "d0=%.2f&d1=%.2f&d2=%.2f&d3=%.2f&d4=%.2f&d5=%.2f&d6=%.2f&d7=%.2f&d8=%.2f&d9=%.2f", pres, temp, humi, anemo, vane, rain, light, uv, moist, temp2); + sprintf(&post_data[strlen(post_data)], "&d0=%.2f&d1=%.2f&d2=%.2f&d3=%.2f&d4=%.2f&d5=%.2f&d6=%.2f&d7=%.2f&d8=%.2f&d9=%.2f", pres, temp, humi, anemo, vane, rain, light, uv, moist, temp2); postContent.puts(post_data); #ifdef NONBLOCKING Net::poll(); - clientP->post("http://weather/post.php", postContent, NULL, &cb_clientP); + clientP->post(STATION_URL, postContent, NULL, &cb_clientP); Net::poll(); #else - clientP->post("http://weather/post.php", postContent, NULL); + clientP->post(STATION_URL, postContent, NULL); #endif led3 = 0; }