Пример #1
0
 private void btnPortClose_Click(object sender, EventArgs e)
 {
     if (Servo_SerialPort.IsOpen)
     {
         Servo_SerialPort.Write(">>CLOSE");
         Client_Machines.Reset();
         Thread.Sleep(500);
         Servo_SerialPort.Close();
         return;
     }
 }
Пример #2
0
 private void SendData()
 {
     System.Text.Encoding.Default.GetBytes(tbSpeed.Text);
     Servo_SerialPort.Write(tbSpeed.Text);
 }