Code samples

Jumpstart your project and explore in-depth samples.

Our sample code lives on GitHub.

Filter by tags

App type

'Hello, Cloud!'

Create an app to talk to the Azure cloud using Azure IoT Hub

tags: c#, beginner, azure, foreground, background

'Hello, blinky!'

A 'Hello, world' sample to control an LED from a breadboard

tags: c#, c++, beginner, foreground, gpio

'Hello, blinky!' background service

Create an app with no UI that toggles an LED on devices running Windows 10 IoT Core

tags: wiring, introductory, background, gpio

'Hello, world!'

Create and deploy your first Windows 10 IoT Core app

tags: c#, beginner, foreground


Connect an accelerometer to your device and read data from it

tags: beginner, spi, i2c, c#

App Service Blinky

Sample app service that allows one background application to control an LED as an app service, and the other background application to blink the LED.

tags: c#, background, beginner, gpio

App Service Shared Notepad

Sample app service with 2 clients. One client writes notepad messages. The other client reads notepad messages and displays them.

tags: c#, background, beginner

Cognitive Services

Access and use the Cognitive Services API inside a C# UWP App

tags: c#, beginner

Companion App

Create a simple app (for Windows Phone 10 or Android) that can configure your device's Wifi.

tags: c#, wifi, beginner

Custom Device Accessor

Use CreateFile() and DeviceIoControl() to access custom devices from UWP.

tags: c++, intermediate

Digital sign

Create a basic digital sign and learn how to work with multimedia

tags: intermediate, foreground, c#

External process launcher

Use Windows.System.ProcessLauncher API to launch external executable programs from your UWP app.

tags: c#, intermediate

Foreground with Background App

An example of building a foreground app and background app within the same APPX file.

tags: c#, c++, intermediate, foreground, background, gpio

GPIO OneWire

Learn how to read from the DHT11 from a Universal Windows Application.

tags: c++, intermediate, gpio

I2C Port Expander

A sample that shows how to use a port expander to read the status of a tactile switch and control an LED.

tags: c#, beginner, i2c

IoT Blockly

A sample that shows how to leverage various pieces of open source software to create a 'block' development experience on Raspberry Pi.

tags: c#, beginner

IoT Browser

Create a simple web browser

tags: c#, beginner, foreground

IoT Core Default App

Create a UWP app that provides a device-management experience for Windows 10 IoT Core.

tags: c#, intermediate, foreground

IoT Core Media Player

A demonstration of how to play music from an IoT device.

tags: c#, beginner, foreground

IoT Core Service

A simple shared host service for Windows 10 IoT Core.

tags: c++, beginner, foreground

IoT Onboarding (Wi-Fi Onboarding with AllJoyn)

Connect an IoT Device to a Wi-Fi network from a remote PC using AllJoyn

tags: c#, intermediate, wifi

IoT Startup App

Create a UWP Startup app to list and launch apps installed on the IoT Core System

tags: c++, intermediate, foreground

Memory status monitor

Create a console app that monitors memory usage on devices running Windows 10 IoT Core

tags: c++, intermediate, console

NFC for IoT

How to use the NFC APIs on IoT Core.

tags: driver, c#, advanced


Use OpenCV to run facial and body recognition on a photo

tags: c++, beginner, foreground

Potentiometer sensor

Read values from a rotary potentiometer and output data to an LED

tags: beginner, c#, gpio, wiring, foreground

Push button

Make an LED blink with the push of a button

tags: beginner, gpio, c#


Create an app that uses the Raspberry Pi 2 to toggle an RGB LED.

tags: beginner, gpio, c#

SPI display

Write lines of text to an LED display

tags: beginner, spi, c#

Serial UART

Communicate between a desktop and an IoT device over a serial interface

tags: c#, c++, beginner

Shift register

Connect an 8-bit serial-in, parallel-out shift register to your device to toggle eight LED's

tags: advanced, c#

Speech translator

Translate your speech to different languages.

tags: c#, intermediate, azure

Temperature and force sensor

Control a basic temperature and force sensor.

tags: c#, intermediate, spi

Video Capture

Create an app that records video to file, plays video from file.

tags: intermediate, foreground, c#

WebSocket Docker Interop

Learn how to work with Windows containers on Windows 10 IoT Core and Windows IoT Enterprise.

tags: advanced, background, console, c#

Webcam app

Create an app that initializes a web cam, takes pictures, and records video and audio.

tags: intermediate, foreground, c#

Wi-Fi connector

Discover and connect to a WiFi network from a UWP app using Windows.Devices.WiFi.WiFiAdapter API

tags: c#, beginner, wifi

Windows NT Service for RPC

Access privileged features for a UWP application using this sample.

tags: foreground, console, driver, c++

Was this page helpful?
Additional feedback?
Thank you! We appreciate your feedback.