Search by Tags

Toggle a GPIO with Windows IoT Core

 
Article updated at 24 Nov 2017
Compare with Revision



Microsoft provides variations of Simple Blinky Programs. You find them under Samples or on GitHub.

Follow the Microsoft Samples for ARM systems (Raspberry Pi 2/ Dragon Board). On this page we point out the differences to the Microsoft Instructions.

Pin Numbering

If you have the Win 10 IoT Core Starter Kit you should also have the flyer with the pin numbers:


You will need to use the SODIMM Pinnumber to access the pin. Here is a C# code snippet, accessing SODIMM Pin number 98. On the Iris X16 this is pin number 13

        var gpio = GpioController.GetDefault();

        // Show an error if there is no GPIO controller
        if (gpio == null)
        {
            pin = null;
            GpioStatus.Text = "There is no GPIO controller on this device.";
            return;
        }

        pin = gpio.OpenPin(98);  //Here use the SODIMM Pinnumber
        pinValue = GpioPinValue.High;
        pin.Write(pinValue);
        pin.SetDriveMode(GpioPinDriveMode.Output);

Usable Pins

X16 Conector Number Gpio Input Output
13 SODIMM_98 OK OK
14 SODIMM_133 OK OK
15 SODIMM_103 OK OK
16 SODIMM_101 OK OK
17 SODIMM_97 OK OK
18 SODIMM_85 OK NOK
19 SODIMM_79 OK OK
20 SODIMM_45 OK NOK
37 (PWM_A) SODIMM_59 OK OK
38 (PWM_B) SODIMM_28 OK OK
39 (PWM_C) SODIMM_30 OK OK
40 (PWM_D) SODIMM_67 OK OK

If you use another carrier board you can try to use other pins, but we have not yet tested all of them yet.