예제 #1
0
 private void openClose(object sender, EventArgs e)
 {
     if (arduino.isConnected)
     {
         arduino.Close();
     }
     else
     {
         arduino.Open();
     }
 }
예제 #2
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if (_btnConnect.Text == "Connect")
     {
         arduino.Open();
     }
     else
     {
         arduino.Close();
     }
 }