Esempio n. 1
0
 private void buttonStop_Click(object sender, EventArgs e)
 {
     // All of this operation has been placed inside a "catch-all" exception
     // handler. Normally you would catch the more specific exceptions that
     // the API call might throw (details of which can be found in the
     // Kinesis .NET API document).
     try
     {
         // We ask the device to throw an exception if the operation takes
         // longer than 1000ms (1s).
         _kCubeDCServoMotor.Stop(1000);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Unable to stop\n" + ex);
     }
 }