This tutorial shows the simplest thing that you can do with the GrovePi: Blink a LED.
Introduction to GrovePi with Windows IOT: LED Blink Tutorial
This tutorial shows the simplest thing that you can do with the GrovePi: Blink a LED. This is a great first project to learn how to connect hardware to the Raspberry Pi. The blinking LED is the hardware version of the software world’s “Hello World” program. Once mastered, you can move on to more complicated projects like connecting a display to the Raspberry Pi or other sensors.
This example is meant to be your first project with the GrovePi. All the parts used in this project are available in the GrovePi Starter Kit.
Hardware for This Tutorial
All of the hardware comes with the GrovePi starter kit. Specifically, for the Raspberry Pi LED Tutorial, you’ll need:
Hardware Setup: Connecting the LED to the Raspberry Pi
Software: Running the Program
- Download the GrovePi Windows IoT Drivers and open GrovePi.sln.
- Set “Driver” as your “Startup Project”
- Replace the code found in “SampleDriver.CS” with the code listed below
- Deploy to your device and watch the LED blink. (Refer to this link If you have not previously setup visual studio to deploy to your Raspberry Pi)
public sealed class SimpleDriver : IBackgroundTask
private readonly IBuildGroveDevices _deviceFactory = DeviceFactory.Build;
public void Run(IBackgroundTaskInstance taskInstance)
var led = _deviceFactory.Led(Pin.DigitalPin4);
Source: GrovePi Windows IoT: LED Blink