IEEE1888(FIAP)を使ってデータを保存するプログラムです。 構造体の形式が変わりました。(Arduino版と同じになりました) オフィシャルライブラリ EthernetInterfaceを使用します。
Dependencies: EthernetInterface FiapV2 HTTPClientForSOAP NTPClient TextLCD mbed-rtos mbed spxml
Revision 1:ddf5d6f68d58, committed 2012-08-20
- Comitter:
- yueee_yt
- Date:
- Mon Aug 20 23:48:06 2012 +0000
- Parent:
- 0:27cf9683af17
- Child:
- 2:930f87d8765f
- Commit message:
- revise
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Aug 20 12:05:25 2012 +0000
+++ b/main.cpp Mon Aug 20 23:48:06 2012 +0000
@@ -15,9 +15,10 @@
AnalogIn ain(p15);
DigitalOut led(LED1);
char timezone[] = "+09:00"; // JST
+char atemp[6];
FIAP fiap("http://192.168.1.3/axis2/services/FIAPStorage");
struct fiap_element element[]= {
- {"http://csse-tech.jp/temp_tauchi",NULL,NULL,NULL,NULL,NULL,NULL,NULL,timezone},
+ {"http://csse-tech.jp/temp_tauchi",atemp,NULL,NULL,NULL,NULL,NULL,NULL,timezone},
};
@@ -32,7 +33,6 @@
lcd.locate(0,1);
lcd.printf("%s %4.1fDeg",buffer,temp);
// Save to FIAPStorage
- char atemp[6];
sprintf(atemp,"%4.1f",temp);
struct tm t = *localtime(&ctTime);
element[0].value=atemp;