/// <summary> /// 制御開始 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void clickStart(object sender, RoutedEventArgs e) { GpioController gpio = GpioController.GetDefault(); if (servo1 == null) { servo1 = new Servo(gpio.OpenPin(13).DriveMode(GpioPinDriveMode.Output)); servo2 = new Servo(gpio.OpenPin(6).DriveMode(GpioPinDriveMode.Output)); } servo1.Start(); servo2.Start(); servo1.Position = 0; servo2.Position = 0; }
/// <summary> /// 制御開始 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void clickStart(object sender, RoutedEventArgs e) { GpioController gpio = GpioController.GetDefault(); if (servo1 == null) { servo1 = new Servo(gpio.OpenPin(13).DriveMode(GpioPinDriveMode.Output)); servo2 = new Servo(gpio.OpenPin(6).DriveMode(GpioPinDriveMode.Output)); } servo1.Start(); servo2.Start(); servo1.Position = 0; servo2.Position = 0; }