イベント用のサンプルプログラムです。
Dependencies: Milkcocoa-os MultiIoTBoardLib
Fork of MilkcocoaOsSample_ESP8266 by
Revision 10:087a29f80ae6, committed 2018-03-27
- Comitter:
- jksoft_mbedos5
- Date:
- Tue Mar 27 03:26:33 2018 +0000
- Parent:
- 9:86de1bb47453
- Commit message:
- ID?????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Mar 01 02:18:55 2018 +0000 +++ b/main.cpp Tue Mar 27 03:26:33 2018 +0000 @@ -9,12 +9,12 @@ /************************* WiFi Access Point *********************************/ -#define WLAN_SSID "...SSID..." -#define WLAN_PASS "...PASS..." +#define WLAN_SSID "..ssid .." +#define WLAN_PASS ".. password .." /************************* Your Milkcocoa Setup *********************************/ -#define MILKCOCOA_APP_ID "...YOUR_MILKCOCOA_APP_ID..." +#define MILKCOCOA_APP_ID ".. milkcocoa app id .." #define MILKCOCOA_DATASTORE "environment" /************* Milkcocoa Setup (you don't need to change this!) ******************/ @@ -50,11 +50,17 @@ DataElement elem = DataElement(); elem.setValue("temperature", bme.getTemperature()); elem.setValue("humidity", bme.getHumidity()); + elem.setValue("id", "home"); - milkcocoa->push(MILKCOCOA_DATASTORE, elem); + if(count >= 7 ){ + milkcocoa->push(MILKCOCOA_DATASTORE, elem); + count = 0; + } + count++; milkcocoa->loop(); - Thread::wait(7*1000); + Thread::wait(1*1000); + } }