Exemplo n.º 1
0
 /// <summary>
 /// Send data to the serial port.
 /// </summary>
 /// <param name="data">Data to send.</param>
 public void SendDataToSerial(string data)
 {
     // Verify connection is open then send data
     if (IsSerialConnected())
     {
         _serialPort.SendData(data);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Send data to the serial port.
 /// </summary>
 /// <param name="data">Data to send.</param>
 /// <param name="useCR">Add [CR] to end.</param>
 public void SendDataToSerial(string data, bool useCR = true)
 {
     // Verify connection is open then send data
     if (IsSerialConnected())
     {
         // Add carrage return, line feed to the end
         _serialPort.SendData(data, useCR);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Send data to the serial port.
 /// </summary>
 /// <param name="data">Data to send.</param>
 public void SendDataToSerial(string data)
 {
     // Verify connection is open then send data
     if (IsSerialConnected())
     {
         // Add carrage return, line feed to the end
         _serialPort.SendData(data + "\r\n", false);
     }
 }