ENG [#IOT] #RaspberryPi2 and #Windows10, Hi Blinky! (5 of N)


New post for Windows 10 and Raspberry Pi 2 series

  1. Hardware and software (1 on N)
  2. Boot from SD card in the device (2 of N)
  3. Hello World mode! (3 of N)
  4. Visual Studio deployment process and Web Management app (4 on N)
  5. Hello Blinky !!! (5 on N)
  6. Some admin tasks, like change password and change name (6 on N)
  7. List of connected devices in the Raspberry Pi 2 (7 on N)
  8. Deploy an app using the deploy package (8 on N)

After the last post is pending to see a little more in depth what you can do with Windows IoT Core and a device, if you want to interact with some sensors in digital mode.

In today’s post I’ll show you what is known as the Hello world in the world of makers: make a led to blink in a device. For this demo, I am using the Grove Raspberry Pi Starter Kit that allows me prototype quickly to these scenarios. In this example, I use one which brings the Starter Kit using a LED on pin 4.


In the previous post I explained how to create a Universal App, in this case we follow the following steps with the exception that in the MainForm, we will add a timer with the following code.


At every tick of the timer change the State of the LED on Pin 4 of ON to OFF, then ON, etc. To be able to begin interaction with the digital Pins of the device, we need to add a reference in our project to Windows IoT Extension SDK


Once added the reference we can add the code necessary to interact with the LED, it is similar to the following


Now we can already deploy the app in our Raspberry Pi. Remember the important thing is to change the platform to ARM, rather than X 86


After a few seconds the app it is already running, see how led begins its flashing

The source code for this solution is available on Github


Saludos @ Madrid

/El Bruno


Grove Raspberry PI StarterKit, http://www.seeedstudio.com/depot/GrovePi-Starter-Kit-for-Raspberry-Pi-p-2240.html?cPath=122_154_151


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: