
Simpe IoT BoardにGrove温度センサを繋げてIFTTTにプッシュするプログラムです。
Dependencies: ESP8266Interface IFTTT mbed
Fork of SimpleIoTBoard_sample by
SoftSerialSendOnly/SoftSerial_Ticker.h
- Committer:
- jksoft
- Date:
- 2015-11-12
- Revision:
- 5:2039ddc6f807
- Parent:
- 4:3994cd534bd5
File content as of revision 5:2039ddc6f807:
//A modified version of the regular ticker/timeout libraries to allow us to do timeout without losing accuracy #ifndef FLEXTICKER_H #define FLEXTICKER_H #include "mbed.h" class FlexTicker: public TimerEvent { public: template<typename T> void attach(T* tptr, void (T::*mptr)(void)) { _function.attach(tptr, mptr); } /** Detach the function */ void detach() { remove(); } void setNext(int delay) { insert(event.timestamp + delay); } void prime(void) { event.timestamp = us_ticker_read(); } protected: virtual void handler() { _function.call(); } unsigned int _delay; FunctionPointer _function; }; #endif