Windows IoT Core 10 & Raspberry Pi missing Gpio reference

Error CS0246 The type or namespace name 'GpioPin' could not be found (are you missing a using directive or an assembly reference?)

Problem that you don't appear to be able to have the Gpio namespace or spi namespace or I2C namespace in your project?

Started looking at the Samples for Windows IoT on the Raspberry Pi, say from the samples Github https://github.com/ms-iot/samples or perhaps from the accompanying https://microsoft.hackster.io/en-US examples?

Working with Win IoT is tricky at the moment as it’s early days for the platform, thus much of the information out there is already out of date as it originates from the previews, after which the landscape has matured. In the next blog post I will highlight how the pin-outs on the Raspberry Pi have changed, the SPI1 is not longer present on the Windows IoT Raspberry Pi API. The graphic on the FAQ has been updated, making all the links to it from forum posts and similar, where the graphic has been linked, not make sense anymore with the new graphic. This is merely one of the many examples where you have to tread carefully and have faith in your experience and knowledge. Having worked extensively with the .NET Microframework on the Netduio platform has given me valuable experience to apply to the new Win IoT world.

When following any of the examples on line, or indeed starting a new project for the first time, there is one important piece of information that is missing. The fact that a reference the “Windows IoT Extensions for the UWP” is required to get the hardware namespaces. This makes perfect sense when you stop to think for a moment. This .dll adds to the UWP the namespaces required for access to hardware features of  IoT devices like the raspberry Pi.

Windows.Devices.DevicesLowLevelContract

This includes Gpio, Adc, I2c, Pwn, Spi namespaces for Windows IoT Raspberry Pi.

Add a reference to Windows IoT Extensions for the UWP and Windows.Devices.Gpio will become available in intellisence.

 

Windows IoT Extensions for the UWP

So the references work in similar way to the .NET Microframework where for the Netduino the following references would be normally added to access the hardware, and other references used if one of the alternative platform boards was used:

 

Add comment

Loading