   if (seconds == 300){//make 300 for each output ie 5 minutes
     sDelay = sDelay+10;
     seconds = 0;
-    Serial.print("sDelay =");
+    Serial.print("Nos Hits =");//Number of successful Hex dumps (not necessarily fre of errors)
+    Serial.println(nosHits,DEC);
+    nosHits=0;
+    Serial.print("sDelay =");//So the progress of the increments on sDelay can be monitored
     Serial.println(sDelay,DEC);
+    lDelay = sDelay*2;//Assume the sampling delays are ratio 1:2
+    timeout=lDelay/5; //Rough number to indicate max loops allowed, if exceeded usually wrong polarity chosen, heals itself if wrong
   }
 } //end of interrupt routine
 

      //Serial.print("B");
    }
    if(nosBytes==maxBytes){
      hexBinDump();//for debug purposes dump out in hex and bainary
      //analyseData();//later on develop your own analysis routines
    }
  }
}

void hexBinDump(){
  //Print the fully aligned binary data in manchester[bank] array
  Serial.print(polarity,DEC);
  Serial.print(" ");
  for( int i=0; i < maxBytes; i++){ 
    byte mask = B10000000;

  digitalWrite(ledPin,0); //data processing exited, look for another header
}//end of mainloop

void add(byte bitData){
  if (discards>0){ //if first one, it has not been found previously
    discards--;
