Monitor for central heating system (e.g. 2zones+hw) Supports up to 15 temp probes (DS18B20/DS18S20) 3 valve monitors Gas pulse meter recording Use stand-alone or with nodeEnergyServer See http://robdobson.com/2015/09/central-heating-monitor
Dependencies: EthernetInterfacePlusHostname NTPClient Onewire RdWebServer SDFileSystem-RTOS mbed-rtos mbed-src
Diff: VoltAlerter.h
- Revision:
- 10:72eb217def1f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VoltAlerter.h Sun Feb 22 20:23:43 2015 +0000 @@ -0,0 +1,29 @@ +// Detect stat of Volt-Alerter +// Device produces a square wave when voltage detected +// Cycle time of square wave around 100ms +// Rob Dobson, 2015 + +#ifndef __VOLTALERTER__H +#define __VOLTALERTER__H +#include "mbed.h" + +class VoltAlerter +{ + public: + VoltAlerter(PinName pinName); + void Service(); + int GetState() + { + return _curPinState; + }; + + static const int CONSECUTIVE_LOWS_REQD_FOR_LOW = 10; + + private: + DigitalIn _inPin; + bool _curPinState; + int _consecutiveLows; +}; + + +#endif \ No newline at end of file