title: Sending Characters to Device via Serial
body: <p>My device has certain commands such as [c8 xxxxx] or [caxxxxx] I have to enter in transmit data box where x = Data=Part/Serial Number, c8 = device command.</p>
  <p>I wanted to know whether I could include the following characters [c8 ] &amp; [ca] or [cc] inside the code below. All I Have to enter is just part/Serial Number as follows: P/N: 1121228 or S/N: JC13F00069</p>
  <p>Please any help would greatly appreciated.
  WJ</p>
  <p>Hans, the characters are indeed hex C8 and CA, I am trying to avoid to enter the brakets and hex just enter the part number. If I could put the following in the code and left only the part number just wanted to know if there is a way I could put [c8 ] or [ca] in the code-which I don't know how to do it.</p>
  <pre><code>Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles            BtnSend.Click
          SerialPort1.Write(TxtTransmit.Text &amp; vbCr) 'The text contained in the txtText will be sent to the serial port as ascii
          'plus the carriage return (Enter Key) the carriage return can be ommitted if the other end does not need it
          'Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSend.Click
          'SerialPort1.Write[(&quot;c8&quot;,0,12) 'The text contained in the txtText will be sent to the serial port as ascii
  End Sub
  </code></pre>