I am a new in Windows 10 IoT.
I will make a application as White Board app with DragonBoard 410c.
I connected push button to GPIO.
And coded as below but error happened.
private void InitGPIO()
{
var gpio = GpioController.GetDefault();
if(gpio == null)
{
var dialog2 = new MessageDialog("Please Check GPIO");
dialog2.ShowAsync();
return;
}
BTN_UP = gpio.OpenPin(BTN_UP_NUMBER);
BTN_UP.SetDriveMode(GpioPinDriveMode.Input);
BTN_UP.DebounceTimeout = TimeSpan.FromMilliseconds(50);
BTN_UP.ValueChanged += btn_up_pushed;
var dialog = new MessageDialog("GPIO Ready");
dialog.ShowAsync();
}
private void btn_up_pushed(GpioPin sender, GpioPinValueChangedEventArgs e)
{
int but_width = 0;
int but_height = 0;
but_width = (int)cutButton.Width;
but_height = (int)cutButton.Height;
}
when I pushed the button, called btn_up_pushed(). but error happened as below picture.
Please help me!