 
 void enableTimer()
 {
-  noInterrupts();
   TIMSK1 |= (1 << TOIE1);
   intrReading = true;
   intrFirst = true;

#endif
}

void dump() {
  enableTimer();
  while (intrReading) {
    // wait
  }
  for (int c = 0; c < intrOnes; ++c) {
    if (intrAtBit-- == 0) {
      intrAtBit = 7;
      --intrAtByte;
    }
  }
  for (int atByte = 0, atBit = 0;
       atByte != intrAtByte || atBit != intrAtBit;
       (++atBit == 8) ? (atBit = 0, ++atByte) : 0) {
    if (atByte && atBit == 0) {
      Serial.print(" ");
    }
    Serial.print((intrSamples[atByte] & (1 << atBit)) ? '1' : '0');
  }
  if (intrZeroes == 20) {
    Serial.print("/*..*/");
  }
  Serial.println();
}

void loop() {
  static bool started = false;
  if (!started) {
    int value = digitalRead(in);
    if (value == HIGH) {
      started = true;
    }
  } else {
    int value = digitalRead(in);
    if (value == LOW) {
      dump();
      started = false;
    }
  }
}

  intrOnes = 0;
  intrZeroes = 0;
  intrSamples[0] = 0;
}

void disableTimer()
