code: int writeAsciiBytes(byte[] buffer, long bytesToWrite) throws IOException {
          if (commPort != null && commPort.isOpen()) {
              int cnt = 0;
              for (int i = 0; i < bytesToWrite; i++) {
                  if (writeAsciiByte(buffer[i]) != 2) {
                      return cnt;
                  }
                  cnt++;
              }
              return cnt;
          }
          else {
              throw new IOException("Comm port is not valid or not open");
          }
      }
docs: Writes an array of bytes out as a stream of ascii characters
  
  @param buffer       Buffer of bytes to write
  @param bytesToWrite Number of characters to write
  @return Number of bytes written
  
  @throws IOException If a problem with the port