Skip to content
A simple node.js application intended to blink the onboard LED on the Intel based development boards such as the Intel(R) Galileo and Edison with Arduino breakout board.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
utl
.gitignore
LICENSE.md
README.md
app.json
icon.png
main.js
package.json
xdk-iot-onboard-led-blink.xdk

README.md

Intel® XDK IoT Node.js* Onboard LED Blink App

See LICENSE.md for license terms and conditions.

This sample application is distributed as part of the Intel® XDK. It can also be downloaded or cloned directly from its git repo on the public Intel XDK GitHub* site.

For help getting started developing applications with the Intel XDK, please start with the Intel XDK documentation.

See also, the mraa library documentation for details regarding supported boards and the mraa library API and the upm library documentation for information regarding the upm sensor and actuator library APIs.

App Overview

A simple Node.js application that blinks the onboard LED (a GPIO output), on select Intel IoT development boards, and displays the result of that write on the console log.

The app initializes a single pin to digital output mode, so it can be written; writes that digital output at a regular basis; and prints the result of each write to the console. The specific pin that is written is configured in cfg-app-platform.js and can be identified by looking for lines similar to the following line of code, in the cfg.init method:

    io = opt.altPin ? io : 100 ;            // use alternate pin?

In the example shown above, LED "pin 100" will be used to flash the LED.

IMPORTANT: the LED pin that is configured by the sample is a function of the detected board. You must inspect the code to determine which LED pin is being configured for use on your board!!

If you are using a NUC (aka "gateway") with an attached Arduino 101 board (aka "firmata" configuration), the I/O pin is identified by adding 512 to the respective I/O pin number, as it would be identified on the Arduino 101 device. See the comments in the cfg-app-platform.js module for details.

Some boards have multiple LEDs that can be written to ("flashed" or "blinked"). The cfg-app-platform.js module has been designed so you can override the pin that is used, by passing it an alternate pin during the init call (see the module documentation). Or, you can simply modify the code in that file to change the default value.

Important App Files

  • main.js
  • package.json

Important Project Files

  • README.md
  • LICENSE.md
  • <project-name>.xdk

Tested IoT Node.js Platforms

See the Intel® NUC support page and the Intel Product Specifications search tool for detailed hardware specifications and support.

This sample can run on other IoT Node.js development platforms, but they must include the appropriate sensor hardware or have an attached Arduino 101 board and utilize the imraa service. If you use an IoT device that is not listed above you may have to make changes to the I/O initialization and configuration code in the cfg-app-platform.js module before it will work on those other platforms. See this device software prerequisites page for help configuring the software on your IoT device so it can be used with the Intel XDK.

You can’t perform that action at this time.