Visual Studio Requirements

Windows IoT Extension for UWP extension is needed – right clicking on your project. Then, select Add > Reference.. 

Select Universal Windows > Exensions > Windows IoT Extension for the UWP, select the latest version and press OK

Add IO Pins Capability

(Includes adding SPI port, I2C port, etc capabilities)

To enable the IO pins open “Package.appxmanifest” > Capabilities Tab > Select “Low Level”


using Windows.Devices.Gpio;

Using IO Pins

You can setup the IO pins in the App.xaml.cs OnLaunched() function no problem, but don’t set them up in the App() constructor

Defining your pins
	private GpioPin GpioPinMotorEnable;
	private GpioPin GpioPinMySwitch;
	//----- INITIALISE IO PINS -----
	var gpio = GpioController.GetDefault();
	if (gpio == null)

	GpioPinMotorEnable = gpio.OpenPin(17);					//<<<RPi GPIO## Pin number

	GpioPinMySwitch = gpio.OpenPin(18);                     //<<<Rpi GPIO## Pin number
Setting Output Pins

Reading Input Pins
	if (GpioPinMySwitch.Read() == GpioPinValue.High)
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.