code: public static byte[] i2cWriteRequest(byte slaveAddress, byte... bytesToWrite) {
          byte[] result = new byte[bytesToWrite.length * 2 + 5];
          result[0] = START_SYSEX;
          result[1] = I2C_REQUEST;
          result[2] = slaveAddress;
          result[3] = I2C_WRITE;
          //TODO replace I2C_WRITE with generated slave address (MSB) to support 10-bit mode
          // see https://github.com/firmata/protocol/blob/master/i2c.md
          for (int x = 0; x < bytesToWrite.length; x++) {
              int skipIndex = x * 2 + 4;
              result[skipIndex] = (byte) (bytesToWrite[x] & 0x7F);
              result[skipIndex + 1] = (byte) (((bytesToWrite[x] & 0xFF) >>> 7) & 0x7F);
          }
          result[result.length - 1] = END_SYSEX;
          return result;
      }
docs: Builds a message that asks a Firmata device to send specified data to
  specified I2C device. <b>Does not support 10-bit mode.</b>
  
  @param slaveAddress address of the I2C device you want to talk to
  @param bytesToWrite data to send to the slaveAdderss
  @return the message