   
   Timer1.initialize(750000); 
   Timer1.attachInterrupt( timerIsr ); // attach the service routine here
+  
+  
+  // Hall effect flow meter
+  input_heat = {
+    0,  // sensorInterrupt
+    2,  // sensorPin
+    0,  // pulseCount
+    0,  // flowRate
+    0,  // flowMilliLitres
+    0,  // totalMilliLitres
+    0,  // oldTime
+    pulseCounter_heat // pulseCounter
+  };
+  
+  input_pipe = {
+    1,  // sensorInterrupt
+    3,  // sensorPin
+    0,  // pulseCount
+    0,  // flowRate
+    0,  // flowMilliLitres
+    0,  // totalMilliLitres
+    0,  // oldTime
+    pulseCounter_pipe // pulseCounter
+   };
+  
+  
+  pinMode(input_heat.sensorPin, INPUT);
+  digitalWrite(input_heat.sensorPin, HIGH);
+  
+  pinMode(input_pipe.sensorPin, INPUT);
+  digitalWrite(input_pipe.sensorPin, HIGH);
+
+  // Configured to trigger on a FALLING state change (transition from HIGH
+  // state to LOW state)
+  attachInterrupt(input_heat.sensorInterrupt, input_heat.pulseCounter, FALLING);
+  attachInterrupt(input_pipe.sensorInterrupt, input_pipe.pulseCounter, FALLING);
+
 
 }
 

#include "OneWire.h"
#include "DallasTemperature.h"
#include "TimerOne.h"

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS A0
#define TEMPERATURE_PRECISION 12


float         heatTemp,        pipeTemp,        boilTemp;


flow_sensor_t input_heat;
flow_sensor_t input_pipe;

// The hall-effect flow sensor outputs approximately 4.5 pulses per second per
// litre/minute of flow.
float calibrationFactor = 4.5;


void setup(void)
{
  // start serial port
  Serial.begin(57600);

  // 1-wire devices temperature

  // Start up the library
  sensors.begin();
