code: 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();
          }
      }
docs: Send a set of bits
  
  @param bitSet Bits (000000000001010100010001)
  @param length Length of the bit string (24)