          if (patternLength_ > 0) {
            sequenceNr_ = 0;
            triggerNr_ = -skipTriggers_;
-           triggerState_ = digitalRead(inPin_);
+           triggerState_ = digitalRead(inPin_) == HIGH;
            PORTB = B00000000;
            Serial.write( byte(8));
            triggerMode_ = true;           


       }
    }
    // In trigger mode, we will blank even if blanking is not on..
    if (triggerMode_) {
      int tmp = PIND & inPinBit_;
      if (tmp != triggerState_) {
        if (blankOnHigh_ && (tmp == HIGH) ) {
          PORTB = 0;
        }
        else if (!blankOnHigh_ && (tmp == LOW) ) {
          PORTB = 0;
        }
        else { 

          PORTB = currentPattern_;
        else
          PORTB = 0;
      }  else {
        if (! (PIND & inPinBit_))
          PORTB = 0;
        else  
          PORTB = currentPattern_;
      }
    }
}
