       // Add delay after carriage return (200m or more)
       sendToTTY(0);
       sendToTTY(0);
-      //sendToTTY(0);
     }
     if (b==LF) {
       // Add delay after line feed
       sendToTTY(0);
-      //sendToTTY(0);
     }
   }
 


  if (isTestMode) {
    // print a test sequence
    digitalWrite(PIN_INTERNAL_LED, HIGH);
    selfTest();
  }
  digitalWrite(PIN_INTERNAL_LED, LOW);

  if (HWSERIAL.available() > 0) {
    millisSinceActivity = 0;
    waitAlign();
    incomingByte = HWSERIAL.read();
    incomingByte = processTTYByte(incomingByte);
  }

  if (Serial.available() > 0) {
    millisSinceActivity = 0;
    waitAlign();
    incomingByte = Serial.read();
    incomingByte = processUSBByte(incomingByte);
  } 

  if (millisSinceActivity > 1000) {
    waitAlign();
    HWSERIAL.setBreak();
  }

}


void waitAlign() {
  // align to 10th of a second to spare the clutch
  while ((millisSinceActivity % 100) != 0) {}
}



  HWSERIAL.begin(BAUDRATE); //, SERIAL_8N2);
#endif

  millisSinceActivity = SNOOZETIME;
  readOptions();
}

