     digitalWrite(out, HIGH);
     digitalWrite(debug, HIGH);
   }
-#else
-  static int value = 0;
-  value ^= 1;
-  digitalWrite(out, value);
-  digitalWrite(debug, value);
-#endif
 }
 
 /* End of timer interrupt code */

  sendBits(setHHMM, sizeof(setHHMM) * 8);
}

void loop() {
  static bool flag = true;
  if (flag) {
    sendHHMM(99, 99);
    flag = false;
  }
  uint16_t length = es.ES_enc28j60PacketReceive(bufferSize, buf);
  if (length && length >= 42 /* IP packet min length */ && length <= UDP_DATA_P + NTP_PACKET_SIZE) {
    if (es.ES_eth_type_is_arp_and_my_ip(buf, length)) {

volatile int writeCurBit = 0;
volatile int writeCurByte = 0;

volatile uint32_t curTime = 0;
volatile uint32_t curTimeFractions = 0;
bool knowTime = false;

static const int prescaler = 1;
static const double systemHz = 16000000;
static const double bitLength = 52.0 / 1000000.0;
static const unsigned int finetuning = 50; // fine-tuned with an oscilloscope
static const unsigned int timerPreload = 65536 - systemHz / prescaler / (1 / bitLength) + finetuning;

// how much to advance curTimeFractions in the interrupt handler
//volatile uint32_t fractionsPerOverflow = 4294967296 / bitLength / 10000;
volatile uint32_t fractionsPerOverflow = 100000;

void setupTimer()
{
  // initialize timer1 
