Junichi Katsu
/
MilkcocoaOsSample_Eth_sensor
mbed(エンベッド)の仕組みを学び、試作体験!用のサンプル
Fork of MilkcocoaOsSample_Eth by
Diff: main.cpp
- Revision:
- 5:103da32c92c7
- Parent:
- 2:727e3e0fcb81
- Child:
- 7:49a5a7e621d6
--- a/main.cpp Fri May 19 01:34:41 2017 +0000 +++ b/main.cpp Thu Jun 01 00:25:37 2017 +0000 @@ -38,15 +38,19 @@ pc.printf("%d\n\r",milkcocoa->on(MILKCOCOA_DATASTORE, "push", onpush)); +#ifdef __MILKCOCOA_THREAD milkcocoa->setLoopCycle(5000); milkcocoa->start(); - +#endif while(1) { DataElement elem = DataElement(); elem.setValue("v", 1); milkcocoa->push(MILKCOCOA_DATASTORE, elem); +#ifndef __MILKCOCOA_THREAD + milkcocoa->loop(); +#endif Thread::wait(7000); }