Code samples

Jumpstart your project and explore in-depth samples.

Our sample code lives on GitHub

New Samples

'Hello, blinky!' server

Create a simple 'Hello, world!' web server app that controls an LED

Python

tags: python, beginner, background, gpio

AllJoyn Device System Bridge

Create an AllJoyn Device System Bridge App project.

C#
C++

tags: intermediate, c#, c++, foreground, alljoyn

AllJoyn mock adapter

Expose and control mock AllJoyn devices.

C++

tags: c++, intermediate, foreground, alljoyn

BACnet adapter

Set up a BACnet adapter for Device System Bridge on Windows 10

C++

tags: intermediate, alljoyn, c++

All Samples

Filter by tags

Skill level
Language
Connectivity
App type
I/O
Other

'Hello, Cloud!'

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

C#

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

'Hello, blinky!'

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

C#/C++

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

C#
Python
Wiring
Node.js

tags: c#, python, wiring, beginner, background, gpio, node.js

'Hello, blinky!' console app

Create a 'Hello, world' console app to control an LED

Node.js

tags: node.js, beginner, console, gpio

'Hello, blinky!' server

Create a simple 'Hello, world!' web server app that controls an LED

Python

tags: python, beginner, background, gpio

'Hello, world!'

Create and deploy your first Windows 10 IoT Core app

C#
Python
Node.js

tags: c#, python, node.js, beginner, foreground

AllJoyn Device System Bridge

Create an AllJoyn Device System Bridge App project.

C#
C++

tags: intermediate, c#, c++, foreground, alljoyn

AllJoyn mock adapter

Expose and control mock AllJoyn devices.

C++

tags: c++, intermediate, foreground, alljoyn

AllJoyn.Js

Get AllJoyn.JS running as a Windows 10 application.

C#

tags: c#, intermediate, foreground, alljoyn

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.

C#

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.

C#

tags: c#, background, beginner

App installer

Install and deploy an app on Windows IoT Core

Learn More

tags: intermediate, o/s

Arduino Wiring libraries

Build Arduino Wiring libraries that can be called from other languages like C# and Node.js

C#/C++

tags: c#, c++, node.js, wiring, intermediate, lightning

Arduino Wiring weather station

Set up a weather station using Arduino Wiring.

Wiring

tags: wiring, beginner, i2c

Azure data uploader

Upload sensor data to Azure storage from a Node.js UWP app

Node.js

tags: intermediate, johnny-five, azure, node.js

Azure weather station

Build a weather station application to demonstrate the capabilities of Power BI and Azure Active Directory

C#

tags: c#, beginner, foreground, azure

BACnet adapter

Set up a BACnet adapter for Device System Bridge on Windows 10

C++

tags: intermediate, alljoyn, c++

Bluetooth Serial

Send and receive messages over Bluetooth serial

C#

tags: bluetooth, rfcomm, c#, beginner

Bluetooth low energy GATT

Learn how to work with Bluetooth Low Energy devices using the GATT profile and a TI CC2541 SensorTag

C#

tags: bluetooth, ble, c#, intermediate

Cognitive Services

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

C#

tags: c#, beginner

Cylon LED controller

Blink an Arduino LED using Cylon in a Node.js console app

Node.js

tags: intermediate, node.js, console

Cylon servo controller

Control a servo connected to an Arduino using Cylon in a Node.js UWP app

Node.js

tags: intermediate, node.js

DC motor controller

Control DC motors using a Windows IoT Core enabled device!

Wiring

tags: wiring, beginner, motor

Device I/O controller

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

C++

tags: driver, c++, advanced

Digital sign

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

C#

tags: intermediate, foreground, c#

Driver sample

Create and interact with a universal driver on devices running Windows 10 IoT Core

C++

tags: driver, advanced, c++

Express Node.js app

Create a new Express Node.js app

Node.js

tags: intermediate, server, node.js, express

External process launcher

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

C#

tags: c#, intermediate, o/s

GPIO OneWire

Create an app that uses GPIO to read from the DHT11, a temperature and humidity sensor that uses a single-wire protocol

C++

tags: c++, intermediate, gpio

GpioTestTool

A command line utility to access GPIO.

C++

tags: c++, intermediate, gpio, win32

HID Injection driver

Build a driver for IoT Core and use HID Injection to inject touch, keyboard or mouse events.

C++

tags: driver, c++, advanced

I2C accelerometer

Connect an accelerometer to your device and read data from it

C#

tags: beginner, i2c, c#

I2C port expander

Connect a port expander to read the status of a tactile switch and control an LED

C#

tags: advanced, i2c, gpio, c#

I2cTestTool

A command line utility to access I2C.

C++/CX

tags: c++, intermediate, i2c, win32

IoT Core Default App

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

C#

tags: c#, intermediate, foreground, o/s

IoT Home App

Create a UWP app to demonstrate navigation between multiple app using protocol uri scheme

C++

tags: c++, intermediate, foreground, o/s

IoT Onboarding with AllJoyn

Remotely connect an IoT Device to a Wi-Fi network using AllJoyn

C#

tags: c#, intermediate, alljoyn, onboarding, wi-fi, soft ap

IoT Startup App

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

C++

tags: c++, intermediate, foreground, o/s

IoT browser

Create a simple web browser

C#

tags: c#, beginner, foreground, o/s

Johnny-Five servo controller

Control a servo connected to an Arduino using Johnny-Five in a Node.js UWP app

Node.js

tags: intermediate, johnny-five, servo, node.js

LCD text display

Deploy and debug an Arduino Wiring sketch to control text on an LCD screen

Wiring

tags: wiring, beginner

Lightning.Providers - Blinky

Demonstrating the use of Microsoft.IoT.Lightning.Providers in UWP apps

C#/C++

tags: c#, c++, intermediate, gpio, lightning

Lightning.Providers - Blinky background service

Demonstrating the use of Microsoft.IoT.Lightning.Providers in UWP apps

C#/C++
Node.js

tags: intermediate, c#, c++, lightning, node.js

Lightning.Providers - SPI display

Demonstrating the use of Microsoft.IoT.Lightning.Providers in UWP apps

C#/C++

tags: c#, c++, intermediate, lightning, spi

Lightning.Providers - Weather station

Demonstrating the use of Microsoft.IoT.Lightning.Providers in UWP apps

C#/C++

tags: c#, c++, intermediate, lightning, i2c

Memory status monitor

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

C++
Node.js

tags: c++, node.js, intermediate, console, o/s

NFC for IoT

How to use the NFC APIs on IoT Core.

C#

tags: driver, c#, advanced

OIC adapter

Exposes and controls the OIC/IoTivity devices and resources

C++

tags: c++, intermediate, alljoyn

OneNote cloud services

Learn how to use http messages to GET and POST OneNote pages in Wiring

Wiring

tags: intermediate, wiring, onenote

OpenCV

Use OpenCV to run facial and body recognition on a photo

C++

tags: c++, beginner, foreground

Potentiometer sensor

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

C#
Wiring

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

Push button

Make an LED blink with the push of a button

C#

tags: beginner, gpio, c#

RGB LED

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

C#

tags: beginner, gpio, c#

RGB pixel strip

Learn how to use an RGB pixel strip in Wiring

Wiring

tags: wiring, beginner, gpio, lightning

SPI accelerometer

Connect an accelerometer to your device and read data from it

C#
Python

tags: beginner, spi, c#

SPI display

Write lines of text to an LED display

C#

tags: beginner, spi, c#

Serial UART

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

C#/C++

tags: c#, c++, uart, beginner

Shift register

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

C#

tags: advanced, c#

Speech translator

Translate your speech to different languages.

C#

tags: c#, intermediate, azure, cognitiveservices, adk, speech language packs

SpiTestTool

A command line utility to access SPI.

C++/CX

tags: c++, intermediate, spi, win32

Stepper motor

Deploy and debug an Arduino Wiring sketch to control a stepper motor

Wiring

tags: wiring, beginner, gpio

TPM Device Test

Write an app that can authenticate to Azure while protecting the security-sensitive information on the device

C#

tags: c#, beginner, azure, foreground

Temperature and force sensor

Control a basic temperature and force sensor.

C#

tags: c#, intermediate, gpio, i2c

Video Capture

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

C#

tags: intermediate, foreground, c#

Webcam app

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

C#

tags: intermediate, foreground, c#

Wi-Fi connector

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

C#

tags: c#, beginner, wi-fi

Z-Wave adapter

Expose and controlg Z-Wave devices.

C++

tags: c++, intermediate, alljoyn

ZigBee adapter

Set up the ZigBee adapter for Device System Bridge (DSB)

C#

tags: c#, intermediate, alljoyn


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