Checking whether GPIO is available

GPIO pins are accessed through the GpioController class defined in the Windows.Devices.Gpio namespace. First, we must check that GPIO is available on the machine. We do this by getting the default controller, and checking whether it's available:

gpio = GpioController.GetDefault(); 
if (gpio != null) 
{ 
   ... 
} 
else 
   Log.Error("Unable to get access to GPIO pin " +
gpioOutputPin.ToString());
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.160.61