       }  
     } else if (blanking_) {
       if (blankOnHigh_) {
-        if (digitalRead(inPin_) == LOW)
+        if (! (PIND & inPinBit_))
           PORTB = currentPattern_;
         else
           PORTB = 0;
       } else {
-        if (digitalRead(inPin_) == LOW)
+        if (! (PIND & inPinBit_))
           PORTB = 0;
         else     
           PORTB = currentPattern_; 

 
   unsigned int version_ = 2;
   
   // pin on which to receive the trigger (either 2 or 3, changed attachInterrupt accordingly)
   int inPin_ = 2;  
   // pin connected to DIN of TLV5618
   int dataPin = 3;
   // pin connected to SCLK of TLV5618

    }
    // 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;
