public void send ( final BitSet bitSet , int length ) { if ( transmitterPin != null ) { for ( int nRepeat = 0 ; nRepeat < repeatTransmit ; nRepeat ++ ) { for ( int i = 0 ; i < length ; i ++ ) { if ( bitSet . get ( i ) ) { transmit ( protocol . getOneBit ( ) ) ; } else { transmit ( protocol . getZeroBit ( ) ) ; } } sendSync ( ) ; } transmitterPin . low ( ) ; } }
Send a set of bits