Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Hello World Blinky

Your first WinIOT project with the GrovePi! This example simply turns and LED on and off at 1 second intervals.

The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here.

This example combines the GrovePi and Grove LED.


You must have the following:

Install a Visual Studio 2015

If you don't already have one installed, install Visual Studio 2015. You can use the free Community edition, or any other higher edition. When you are installing Visual Studio, you must do a Custom install and select to install the Universal Windows App Development Tools -> Tools and Windows SDK.

After the installation is complete, install the Windows IoT Core Project Templates from here.

Enable Developer Mode on your Windows 10 Development Device

When you are developing on Windows 10, you choose what tasks you want to enable on the device. This includes any devices - Windows 10 desktops, tablets and phones. You can enable a device for development, or just app side loading. To enable Developer mode on your Windows 10 device:

  1. Click the Windows icon (typically in the lower-left of the screen, on the left-most side of the toolbar).
  2. Type Update and select Windows Update settings from the Best match list. This will open the UPDATE & SECURITY settings page.
  3. Click on For developers in the left sidebar.
  4. Ensure the Developer mode radio button is selected.
  5. Save your changes and close the Settings window.

Build the Samples

Download the GrovePi repository to your development PC.

Each sample is its own solution. There are two ways to run the sample projects - within the GrovePi solution, or as individual solutions.

Samples as Part of GrovePi solution (recommended)

When you run the samples as part of the GrovePi solution you know that you are using the very latest build of GrovePi, however; the samples are not part of the GrovePi solution by default - you must add them.

  1. Open GrovePi\Software\CSharp\GrovePi.sln in Visual Studio
  2. Right-click on the solution in the Solution Explorer
  3. Select Add > __ New Solution Folder__
  4. Name the folder Samples
  5. Right-click on the solution in the Solution Explorer
  6. Select Add > __ Existing Project__
  7. Find the HelloWorldBlinky.csproj file - select it and click Open

This will add the HelloWorldBlinky project to you new Samples directory.

In the HelloWorldBlinky project you need to update the reference to GrovePi.

  1. In Solution Explorer expand the HelloWorldBlinky project and the References node.
  2. Right-click on the GrovePi reference and click _Remove
  3. Right-click on the References node and choose Add Reference
  4. Expand the Projects node
  5. Select (by checking the check box) the GrovePi project.
  6. Click OK

The project should now have all the updated references you need.

Samples as Independent Solutions

When you run the sampels as independent solutions, you need to ensure you are referencing a current version of the GrovePi assembly (likely more current than the one available as a NuGet package).

The following steps assume you have already opened GrovePi\Software\CSharp\GrovePi.sln in Visual Studio and built the solution. To build the solution, open GrovePi.sln, and click on press CTRL + SHIFT + B. Then close GrovePi.sln.

After building the GrovePi solution:

  1. Open GrovePi\Software\CSharp\Samples\LedFade.sln in Visual Studio.
  2. In Solution Explorer expand the HelloWorldBlinky project and the References node.
  3. Right-click on the GrovePi reference and click _Remove.
  4. Right-click on "References" and click "Add Reference".
  5. Select the Browse tab and click the Browse button.
  6. Browse to GrovePi\Software\CSharp\GrovePi\bin\ARM\Debug and select the GrovePi.dll file
  7. Click OK

The project should now have all the updated references you need.

Setup the Hardware

For this sample, connect the following: Grove LED (any color) to D2 (Digital Pin 2)

Run the Sample

To run the sample...

  1. Right-click on the HelloWorldBlinky project in the Solution Explorer
  2. Select Set as Startup Project
  3. Right-click on the Properties node under HelloWorldBlinky and select Open
  4. Select the Debug tab
  5. Select Remote Machine in the Target device field
  6. In the Remote Machine field, Type in the name or IP Address of your Windows 10 IoT Core Raspberry Pi
  7. Press Ctrl + S (this file will not be saved automatically, you must save it manually).
  8. Press F5 to launch the debugger (it will take a minute or two to deploy your app onto the Raspberry Pi).