東京電力の 需要実績を表示します。
Dependencies: EthernetInterface FiapV2 HTTPClientForSOAP TextLCD mbed-rtos mbed spxml
Fork of temp_FIAP_fetch by
Revision 3:654cee27697e, committed 2012-08-22
- Comitter:
- yueee_yt
- Date:
- Wed Aug 22 02:51:26 2012 +0000
- Parent:
- 2:e3279050ce3b
- Commit message:
- fixed
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Aug 22 02:41:42 2012 +0000
+++ b/main.cpp Wed Aug 22 02:51:26 2012 +0000
@@ -9,20 +9,20 @@
DigitalOut led(LED1);
char timezone[] = "+09:00"; // JST
FIAP fiap("http://www.futaba-kikaku.jp/services/jyukyu.php");
-char atemp[7];
+char ademand[7];
struct fiap_element element[]= {
- {"http://futaba-kikaku.jp/epco/tepco/demand",atemp,NULL,NULL,NULL,NULL,NULL,NULL,timezone},
+ {"http://futaba-kikaku.jp/epco/tepco/demand",ademand,NULL,NULL,NULL,NULL,NULL,NULL,timezone},
};
void tick(void )
{
- float temp;
+ float demand;
led=!led;
fiap.fetch_last_data(element,1);
- temp=atof(element[0].value);
+ demand=atof(element[0].value);
lcd.locate(0,1);
- lcd.printf("%02d:%02d:%02d %5.0f",element[0].hour,element[0].minute,element[0].second,temp);
+ lcd.printf("%02d:%02d:%02d %5.0f",element[0].hour,element[0].minute,element[0].second,demand);
}
int main()
@@ -36,6 +36,6 @@
fiap.debug_mode=true;
while(true) {
tick();
- wait(10);
+ wait(60);
}
}
