 #define setPinTTL_OUT2_HIGH() PORTC |= 0b00000010;
 #define setPinTTL_OUT2_LOW() PORTC &= 0b11111101;
 
+#define pinTTL_IN3_pol 10
+#define pinTTL_IN3_Upol 11
 #define pinTTL_OUT3 12 //Source of mirrored TTL is set by mirrorTTL3source.
 #define setPinTTL_OUT3_HIGH() PORTB |= 0b00010000;
 #define setPinTTL_OUT3_LOW() PORTB &= 0b11101111;

  else if (mode == 4){
    mirrorTTL1 = true;
    mirrorTTL2 = false; //Leave clock bias field off
    mirrorTTL3source = 11; //Use unpolarized beta shutter protocol
  }
  else {
    mirrorTTL1 = true;

  pinMode(pinLCWaveplate, OUTPUT);
  pinMode(pinTTL_IN1, INPUT);
  pinMode(pinTTL_OUT1, OUTPUT);
  pinMode(pinTTL_IN2, INPUT);
  pinMode(pinTTL_OUT2, OUTPUT);
  pinMode(pinTTL_OUT3, OUTPUT);
  pinMode(pinTTL_IN3_pol, INPUT);
  pinMode(pinTTL_IN3_Upol, INPUT);
  pinMode(pinClockTTL, OUTPUT);
  attachInterrupt(0, changeStartCOM, RISING);
  attachInterrupt(1, advanceCycleNum, RISING);
