コード例 #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();
     }
 }