ネットワークアップデート機能とか、Pachubeへの情報登録とかの処理を追加しています
Dependencies: Terminal EthernetNetIf Pachube TextLCD mbed ConfigFile FirmwareUpdater
Revision 1:1eb67d074bed, committed 2011-06-06
- Comitter:
- abe00makoto
- Date:
- Mon Jun 06 19:56:43 2011 +0000
- Parent:
- 0:a62f36392b9b
- Commit message:
- add set_time function. for fist use mbed
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 17 13:49:41 2011 +0000 +++ b/main.cpp Mon Jun 06 19:56:43 2011 +0000 @@ -29,7 +29,7 @@ TextLCD output( p24, p26, p27, p28, p29, p30 ); // rs, e, d0-d3 Geigercounter_SBM_20 geiger(p18,p22);//Geiger pin,Spekaer pin -Trans trans(p21,0.16/1000.0,0.76); //Trans pin,period,duty +Trans trans(p21,0.16/1000.0,0.68/*0.76*/); //Trans pin,period,duty static appconf_t appconf; @@ -102,6 +102,7 @@ output.cls(); output.printf("Hello."); wait(1); + set_time(0); //mbed first run dont use time(); /* @@ -178,12 +179,15 @@ if(etherconnect){ if (web_post(&web, feed_id, 0, geiger.getusv()) != PACHUBE_CODE_OK) { - output.printf("Checking Pachube status:x"); + output.cls(); + output.printf("Checking Pachube \nstatus:x"); wait(10); + } if (web_post(&web, feed_id, 1, geiger.getcpm()) != PACHUBE_CODE_OK){ - output.printf("Checking Pachube status:x"); + output.cls(); + output.printf("Checking Pachube \nstatus:x"); wait(10); } } @@ -193,6 +197,7 @@ output.cls(); output.printf("please!!\n net connect\n"); wait(10); + output.cls(); output.printf("mbed reset!!\n"); wait(10); mbed_reset(); @@ -226,13 +231,15 @@ */ if(etherconnect){ if (web_post(&web, feed_id, 0, geiger.getusv()) != PACHUBE_CODE_OK) { - output.printf("Checking Pachube status:x"); + output.cls(); + output.printf("Checking Pachube \nstatus:x"); errcnt++; wait(10); } if (web_post(&web, feed_id, 1, geiger.getcpm()) != PACHUBE_CODE_OK){ - output.printf("Checking Pachube status:x"); + output.cls(); + output.printf("Checking Pachube \nstatus:x"); errcnt++; wait(10); }