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

Revision:
2:6bfef0839102
Child:
4:0d3a207680b0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PulsePin.h	Fri Nov 07 16:09:15 2014 +0000
@@ -0,0 +1,24 @@
+#ifndef __PULSEPIN__H
+#define __PULSEPIN__H
+#include "mbed.h"
+
+class PulsePin
+{
+    public:
+        PulsePin(DigitalIn& pin, bool risingEdge, int pinStableTimeMs);
+        bool Service();
+        int GetLastCycleTimeMs();
+    
+    private:
+        DigitalIn& _pin;
+        Timer _pinTimer;
+        bool _curPinState;
+        bool _firstEdgeDetected;
+        int _lastStableTimeMs;
+        int _waitForPinStabilisationMs;
+        bool _risingEdge;
+        int _timeBetweenEdgesMs;
+};
+
+
+#endif
\ No newline at end of file