Using Intel XDK Templates to Create NodeJS* IoT Projects

This page describes the Intel® XDK "template" samples which can be used to create a Node.js* Internet of Things (IoT) project.

The source code for these templates can be found at or by clicking the GitHub* icon located at the lower right corner of each sample's description box, when viewing the samples from within the Intel® XDK (from the Projects tab, choose Start a New Project > select the Templates group > find the Internet of Things Embedded Application section).


The "template" samples included with the Intel XDK are a collection of small, easy to understand, examples that show how to access digital and analog I/O as well as sensors attached via the I2C* and SPI* peripheral buses. These samples use the MRAA* sensor communication library for low-level communication. The MRAA library is designed to make it easier for developers to communicate with sensors and actuators in high-level languages on those IoT platforms that support the MRAA library.

Design Considerations

Each of the "template" samples requires that the MRAA library and the Intel XDK daemon (aka xdk-daemon) be installed on your IoT board. These two software components are generally included in the default Linux image distributed with Intel IoT boards.

The Intel XDK will attempt to determine the existence and version of the MRAA library and xdk-daemon on your board, when you connect to your IoT board. It will automatically update and/or install those components onto your IoT board (with your permission) if it determines they are missing or out-of-date. See Updating the libmraa and libupm libraries if this automatic detection and installation mechanism fails.

Development and Testing

All of the "template" samples have been tested on the Intel® Galileo Board for Arduino (generation 1 and 2 boards) and the Intel® Edison Board for Arduino. A subset of these samples have been tested on the Intel® Joule™ 570x Developer Kit.

Select "galileo," "edison" or "joule" from the Filter by keyword pulldown at the upper right corner of the samples selection window (see the image above) to quickly identify which samples have been tested on your IoT board. If you are using a board that does not show up in the filter list, but your board does support the MRAA library, you may be able to make the sample work by modifying the sample's initialization code.

Basic I/O samples

Samples that work with a mobile companion app

Templates for the web

For more complete information about compiler optimizations, see our Optimization Notice.