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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers VoltAlerter.h Source File

VoltAlerter.h

00001 // Detect stat of Volt-Alerter
00002 // Device produces a square wave when voltage detected
00003 // Cycle time of square wave around 100ms
00004 // Rob Dobson, 2015
00005 
00006 #ifndef __VOLTALERTER__H
00007 #define __VOLTALERTER__H
00008 #include "mbed.h"
00009 
00010 class VoltAlerter
00011 {
00012     public:
00013         VoltAlerter(PinName pinName);
00014         void Service();
00015         int GetState()
00016         {
00017             return _curPinState;
00018         };
00019 
00020         static const int CONSECUTIVE_LOWS_REQD_FOR_LOW = 10;
00021         
00022     private:
00023         DigitalIn _inPin;
00024         bool _curPinState;
00025         int _consecutiveLows;
00026 };
00027 
00028 
00029 #endif